-Ur option documentation

Andreas Schwab schwab@linux-m68k.org
Fri May 5 21:41:11 GMT 2023


On Mai 05 2023, Florian Weimer via Binutils wrote:

> The manual says this:
>
> '-Ur'
>      For anything other than C++ programs, this option is equivalent to
>      '-r': it generates relocatable output--i.e., an output file that
>      can in turn serve as input to 'ld'.  When linking C++ programs,
>      '-Ur' _does_ resolve references to constructors, unlike '-r'.  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.
>
> For ELF, this refers to the legacy init function, right?

No, it refers to the a.out N_SETx symbols.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


More information about the Binutils mailing list