-Ur option documentation
Nick Clifton
nickc@redhat.com
Wed May 10 14:09:41 GMT 2023
Hi Florian,
> Andreas said that DT_INIT should still work with -Ur, so maybe you don't
> need the SHT_INIT_ARRY clarification?
So:
For programs that do not use constructors or destructors,
or for ELF based systems this option is equivalent to -r:
it generates relocatable output -- i.e., an output file
that can in turn serve as input to ld. For other binaries
however the -Ur option is similar to -r but it also resolves
references to constructors and destructors.
It does not work to use -Ur on files that were themselves
linked with -Ur; once the constructor table has been built,
it cannot be added to. Use -Ur only for the last partial
link, and -r for the others.
Cheers
Nick
More information about the Binutils
mailing list