This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Linking problem (b18): "ld: file.o: bad reloc address 0x4 in section `.text'"


In article <33A6D198.167E@daimi.aau.dk>,
Manmathan Muthukumarapillai  <mannan@daimi.aau.dk> wrote:
>Hello everybody,
>
>Please help me,
>
>I tried to link severel object files, first I linked some of them
>together in one directory to a single file by saying:
>        [e:\test]: ld -r -X -o dira.o dira/*.o
>then I did this:
>        [e:\test]: ld -r -X -o all.o common.o dira.o dirb/*.o
>and got the error:
>        ld: dira.o: bad reloc address 0x4 in section `.text'
>
>Actually I want a function like Microsofts LIB-command, where
>you create a library with different functions used to by other
>C-programs.

I'm sure that others will point out that what you want is actually the
'ar' command.  This is the analog to to the MSVC LIB command.

I believe that the behavior you are seeing with -r -X is a bug, though.
I've had similar problems with -R when I attempt to link objects generated
by MSVC.
-- 
http://www.bbc.com/	cgf@bbc.com			"Strange how unreal
VMS=>UNIX Solutions	Boston Business Computing	 the real can be."
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]