This is the mail archive of the
mailing list for the binutils project.
Re: building glibc with gold linker & -frecord-gcc-switches results in internal error
Cary Coutant <email@example.com> writes:
>> Would the error be about a GOT32 relocation in a non-allocated section?
>> Or would it be about an unrecognized relocation in a string merge
>> section? ÂI can't quite decide if we should give an error for either of
>> those cases or whether we should try to handle them as best we can.
> I think both of those conditions are worthy of an error message. I
> don't think we want to go allocating GOT and PLT entries based on
> relocations in non-allocated sections.
> For string merge sections, the
> only reasonable thing to do other than an error is to turn off the
> merge property and process the section as a normal section -- but by
> the time we are scanning relocations, I think gold is committed to the
> merge processing. I suppose we could make an early check, but I doubt
> it's worth it.
For a string merge section we don't really have to scan the relocs--if
there are any relocs at all, something weird is going on.
Output_section::add_merge_input_section already supports having
add_input_section return false to mean that the section should be
handled as a normal section rather than a merge section.