-Ur option documentation

Florian Weimer fweimer@redhat.com
Mon May 8 10:47:52 GMT 2023


* Andreas Schwab:

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

So this doesn't matter to ELF at all?  Would it be possible to update
the documentation accordingly?

Thanks,
Florian



More information about the Binutils mailing list