This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: relocs_compatible hook considered harmful


On Thu, Apr 24, 2008 at 08:37:23AM -0400, Daniel Jacobowitz wrote:
> So I ran ld by hand and forgot to select the FDPIC emulation.  But
> the inputs were FDPIC.  So they're not relocs_compatible_p because
> they have different emulations.  But they're both ELF objects and
> they have the same machine number and so forth.
> 
> So check_relocs is never called for any of the input files.  Nothing
> creates the GOT section.  But we get to relocate_section, find an
> R_SH_GOT32, trigger an assertion, and then crash.

So return an error instead of the assertion.  Alternatively, teach the
fdpic backend check_relocs how to do all the got, plt and other
dynamic relocs for your alternative output format, and allow
check_relocs to run.

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]