This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] PR ld/18169: sh_info of .rel.plt/.rela.plt sections isn't correct
- From: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Mon, 30 Mar 2015 19:21:26 +1030
- Subject: Re: [PATCH] PR ld/18169: sh_info of .rel.plt/.rela.plt sections isn't correct
- Authentication-results: sourceware.org; auth=none
- References: <20150326183455 dot GA9206 at gmail dot com> <20150326235524 dot GX26234 at bubble dot grove dot modra dot org> <CAMe9rOoPj2aOJx76Aq2toAAqgzq=N7JeVrBN7k9-tBYiF66mkA at mail dot gmail dot com>
On Fri, Mar 27, 2015 at 03:14:17PM -0700, H.J. Lu wrote:
> On Thu, Mar 26, 2015 at 4:55 PM, Alan Modra <email@example.com> wrote:
> > On Thu, Mar 26, 2015 at 11:34:55AM -0700, H.J. Lu wrote:
> >> Since .rela.plt/rel.plt section doesn't contain relocations against .plt
> >> section, we shouldn't set sh_info for .rela.plt/rel.plt section.
> > That depends entirely on your ABI. I'd argue that on x86 you ought to
> > be setting sh_info for .rel.plt to the .got.plt section index.
> > Setting sh_info to zero is not correct.
> Here is a patch. I used want_got_plt to check if .rel.plt applies to
> .got.plt. If it doesn't work for a target, target can provide its own
> elf_backend_get_reloc_section. OK for master?
OK, looks good.
Australia Development Lab, IBM