-Ur option documentation

Florian Weimer fweimer@redhat.com
Thu May 25 08:08:56 GMT 2023


* Nick Clifton:

> 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.

Maybe “For those systems where -r and -Ur behave differently, it does
not work to use -Ur …”?

Thanks,
Florian



More information about the Binutils mailing list