Hi Alex,
Let me see if I understood this correctly. The problem is not really on manually choosing the base address, the problem is that module's "baseaddress" attribute is optional, even when the module is of type "win32dll", if this attribute is empty rbuild sets a common default base address (0x10000000 for win32 dll's).
AFAIK we are using the same base address that the equivalent component has on windows so auto generating it using any sort of tool is not really an option.
In my rbuild branch I introduced the new element "baseaddress", despite it's only a specialized type of "property" it presents some advantages, first of all it gives *meaning* to the information it contains and also allows more complex validations as we known what to expect.
This "baseaddres" element has for now and identical syntax to "property" for example <baseadress name="BASADRESS_JOY" value="0x589b0000" /> so currently to use the value it contains module's "basaddress" attribute must explicitly reference it by name. I could extend it support an additional attribute "dllname" so rbuild could try to auto reference it before falling back to default baseadress in case no value has been specified and no baseaddress could be resolved by module's target name (module.dll). It would act as a base addresses index, we could keep adding correct baseaddress even for not yet existing dlls on reactos. When a module that outputs that dll is created rbuild will link the image to the right address without developer intervention.
Sound good to you?
/Marc
-----Original Message----- From: ros-dev-bounces@reactos.org [mailto:ros-dev-bounces@reactos.org] On Behalf Of Alex Ionescu Sent: Saturday, December 15, 2007 6:26 PM To: ReactOS Development List Subject: [ros-dev] DLL Base Addresses (For Marc)
Hi Marc,
ReactOS desperately needs a tool which builds all the DLLs, then looks at the filesize, chooses a lower-bound base address (such as 0x60000000) and creates a baseadress.xml/.cfg with the right addresses for each DLL.
There are then two choices:
- You generate this .xml once on your computer, and commit the new .cfg - People run this code at every build, the .cfg gets generated, and all the DLLs re-linked at the new address (this should take less than 30 seconds).
The DLL relocation hell in ReactOS has gotten too bad and manually choosing base addresses which seem to work doesn't work anymore.
-- Best regards, Alex Ionescu
_______________________________________________ Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev