This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: binutils is broken on ELF/mips (Re: binutils is broken on Linux/alpha)
On Fri, Oct 05, 2001 at 10:51:12AM +0930, Alan Modra wrote:
> 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
No matter what we do, please make sure all targets are covered.
Thanks.
H.J.