This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Spurious misguided message from GNU gold for missing symbol under 64-bit?

> Can GNU Gold that is compiled and used under 64-bit
> produce a spurious misguided error message instead of simply reporting that
> a symbol is undefined and missing?

I think the "requires dynamic reloc" message is probably not spurious
or misleading, and probably does point to some problem in the build
process. Without any object files to look at, the best I can tell you
is that you'll get this message for an R_X86_64_PC32 relocation under
one of the following conditions:

(1) You're linking with -shared, but did not compile with -fpic.

(2) You're linking an executable, but the symbol is defined in a
shared library, and you've disabled copy relocations (-z nocopyreloc).

(There may be other possibilities, but they seem unlikely at the moment.)

It does later print an undefined reference error message, so that
should rule out the second condition.

What's the complete set of linker flags? Can you at least provide a
copy of MediaDecoderReader.o?

> After scratching my head many times, I tried the
> compilation and linking under 32-bit Debian GNU/Linux. Then I found
> that GNU gold there complained SIMPLY  that the symbol in question is
> "undefined".

When linking for the 32-bit ABI, gold does not print the warning about
a dynamic relocation because (a) dynamic relocations in the text
segment are allowed in 32-bit mode, and (b) a 32-bit pc-relative
relocation can reach the entire address space.


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