* Wrong object file generated with -fPIC option 2.17 ported to Interix
@ 2007-09-19 17:37 Mayank Kumar
2007-09-21 8:03 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: Mayank Kumar @ 2007-09-19 17:37 UTC (permalink / raw)
To: binutils
Hi All
While porting binutils 2.17 to interix, I am getting the following issue:-
An object file generated using -fPIC option has undefined symbols like the following:-
U L10@GOTOFF
U L12@GOTOFF
U L5@GOTOFF
U L6@GOTOFF
U _gl1@GOT
U _src@GOT
I also found that this is happening in the assembly phase. I did the following:-
Gcc -S -fPIC file.c
As -o file.o file.s
The object file generated have all the above as undefined symbol. I want to know what part of assembler or bfd code resolves these labels so that I can debug more to find out why these undefined symbols are getting generated.
Thanks
Mayank
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Wrong object file generated with -fPIC option 2.17 ported to Interix
2007-09-19 17:37 Wrong object file generated with -fPIC option 2.17 ported to Interix Mayank Kumar
@ 2007-09-21 8:03 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2007-09-21 8:03 UTC (permalink / raw)
To: Mayank Kumar; +Cc: binutils
Hi Mayank,
> An object file generated using -fPIC option has undefined symbols like the following:-
> U L10@GOTOFF
> U L12@GOTOFF
> I also found that this is happening in the assembly phase. I did the following:-
> gcc -S -fPIC file.c
> as -o file.o file.s
>
> The object file generated have all the above as undefined symbol.
Just to be clear - it is gcc that is generating the references to these
symbols, not the assembler. If you look at "file.s" you should see them there.
> I want to know what part of assembler or bfd code resolves these
> labels so that I can debug more to find out why these undefined
> symbols are getting generated.
The "@GOTOFF" part of the symbol is a directive to the assembler telling it how
the relocation for the symbol's value should be generated. See the function
lex_get() in gas/config/tc-i386.c
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-09-21 7:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-19 17:37 Wrong object file generated with -fPIC option 2.17 ported to Interix Mayank Kumar
2007-09-21 8:03 ` Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).