binutils is broken on ELF/mips (Re: binutils is broken on Linux/alpha)
Alan Modra
amodra@bigpond.net.au
Thu Oct 4 18:21:00 GMT 2001
On Fri, Oct 05, 2001 at 10:13:09AM +0930, Alan Modra wrote:
> On Thu, Oct 04, 2001 at 12:14:25PM -0700, H . J . Lu wrote:
> >
> > Correct me if I am wrong. From elf_link_input_bfd, when
> >
> > ELF_ST_TYPE (sym->st_info) == STT_SECTION
> > sym->st_value == 0
> > (bfd_get_section_flags (input_bfd, sec) & SEC_LINK_ONCE) != 0
> > bfd_is_abs_section (sec->output_section) == true
> >
> > we know the symbol is in the removed linkonce section. Should we put
> > a macro in elf-bfd.h so that it can be used by all ELF targets? I
> > am thinking something like
>
> I think the last two lines would be sufficient. Rather than changing
> all the back ends, can we do something clever in elflink.h? I'm
> thinking of a hack in elf_link_read_relocs_from_section that turns
> relocs against removed section syms into R_*_NONE relocs.
Nah, elf_link_read_relocs_from_section is called too early in the link,
before the linker decides which sections are kept. We'd need to do
something in elflink.h:elf_link_input_bfd
Alan
More information about the Binutils
mailing list