This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: mips64-elf .rel.dyn sections
- From: Alan Modra <amodra at gmail dot com>
- To: "Jim Wilson (jimwilso)" <jimwilso at cisco dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Mon, 3 Dec 2012 14:52:42 +1030
- Subject: Re: mips64-elf .rel.dyn sections
- References: <F1B9CB88F30838489D77A6F9BAB6F7570F89DD40@xmb-rcd-x07.cisco.com>
On Fri, Nov 30, 2012 at 11:41:09PM +0000, Jim Wilson (jimwilso) wrote:
> The mips64-elf toolchain is creating .rel.dyn sections, even though it does not support dynamic linking, and does not create dynamic sections. I attached a testcase.
A C testcase is generally only of use to people who have the relevant
target C compilers, but in this case I'll make a guess at the
problem..
> This suggests that maybe the line
> || !h->def_regular
> Should instead be
> || (!h->def_regular && !h->ref_regular)
> I am not sure if the h->ref_regular_nonweak bit needs to be tested also or instead of ref_regular.
This is very unlikely to be the correct solution. See the comment on
ref_regular. Your testcase has a common variable, so I'll guess the
line should be
|| (!h->def_regular && !ELF_COMMON_DEF_P (h))
--
Alan Modra
Australia Development Lab, IBM