[ros-dev] rbuild question

Hartmut Birr osexpert at gmail.com
Mon Oct 24 22:43:00 CEST 2005


Casper Hornstrup wrote:
> 
>> -----Original Message-----
>> From: ros-dev-bounces at reactos.org [mailto:ros-dev-bounces at reactos.org] On Behalf Of Hartmut Birr
>> Sent: 22. oktober 2005 16:45
>> To: ReactOS Development List
>> Subject: [ros-dev] rbuild question
>>
>> Hi,
>>
>> for a sample program, I have to specify a linker script file. I'm using the following xml-file:
>>
>> <module name="lowalign" type="win32cui" installbase="bin" installname="lowalign.exe">
>>      <include base="lowalign">.</include>
>>      <define name="__USE_W32API" />
>>      <file>lowalign.c</file>
>>      <linkerflag>-Wl,-T,modules/myapps/lowalign/ldscript</linkerflag>
>>      <linkerflag>-Wl,--file-alignment=0x80</linkerflag>
>>      <linkerflag>-Wl,--section-alignment=0x80</linkerflag>
>> </module>
>>
>> I would like it if I can remove the absolute path from the linker script file. Any ideas?
>>
>> - Hartmut
> 
> Implemented in r18758. Use like:
> 
> 	<linkerscript base="lowalign">ldscript</linkerscript>
> 
> Casper
> 
> _______________________________________________
> Ros-dev mailing list
> Ros-dev at reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev
> 

Hi,

I've some problems with your implementation. With the original xml file I get the following cmd line:

gcc -Wl,--subsystem,console -Wl,--entry,_mainCRTStartup -Wl,--image-base,0x00400000 -Wl,--file-alignment,0x1000 
-Wl,--section-alignment,0x1000 -o  .\up\output-i386\modules\myapps\lowalign\lowalign.exe 
.\up\obj-i386\modules\myapps\lowalign\lowalign.o .\up\obj-i386\lib\ntdll\libntdll.a 
-Wl,-T,modules/myapps/lowalign/ldscript -Wl,--file-alignment=0x80 -Wl,--section-alignment=0x80  -g

With the new syntax, I get the following error:

gcc -Wl,--subsystem,console -Wl,--entry,_mainCRTStartup -Wl,--image-base,0x00400000 -Wl,--file-alignment,0x1000 
-Wl,--section-alignment,0x1000 -o -Wl,-T,modules\myapps\lowalign\ldscript 
.\up\output-i386\modules\myapps\lowalign\lowalign.exe .\up\obj-i386\modules\myapps\lowalign\lowalign.o 
.\up\obj-i386\lib\ntdll\libntdll.a -Wl,--file-alignment=0x80 -Wl,--section-alignment=0x80  -g
e:\mingw\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot open output file 
-Wl,-T,modules\myapps\lowalign\ldscript.exe: No such file or directory
collect2: ld returned 1 exit status
_make: *** [.\up\output-i386\modules\myapps\lowalign\lowalign.exe] Error 1

The problem is, that '-Wl,-T,modules\myapps\lowalign\ldscript' is inserted between '-o' and 
'.\up\output-i386\modules\myapps\lowalign\lowalign.exe'.

- Hartmut


More information about the Ros-dev mailing list