This is the mail archive of the
mailing list for the binutils project.
Re: [gold patch] PR 17643: Add -z bndplt support (for Intel MPX)
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Cary Coutant <ccoutant at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>, Roland McGrath <mcgrathr at google dot com>
- Date: Tue, 10 Jan 2017 14:03:54 -0800
- Subject: Re: [gold patch] PR 17643: Add -z bndplt support (for Intel MPX)
- Authentication-results: sourceware.org; auth=none
- References: <CAJimCsGp_9j=Kg0K-MNvD=x7_bTM9-mrZ9+eUqE8wwZhn3Ccgg@mail.gmail.com>
On Thu, Dec 15, 2016 at 5:20 PM, Cary Coutant <email@example.com> wrote:
> Here's a preliminary patch to add -z bndplt support to gold. If you
> could take a look and give it a try, I'd appreciate it. I'm hoping to
> get this into the 2.28 release.
> I haven't added any tests yet, and I haven't yet adjusted the EH table
> descriptors for the new PLT entries. Do you have a spec or a template
> for what the EH descriptors should look like?
I just noticed that ld generates incorrect unwind info for BND PLT.
> The PLT code seems to match what ld generates (which does not quite
> match the psABI spec -- see my email on the psABI list), and a basic
> test program works. I haven't actually run any tests that verify that
> the BND registers aren't getting cleared, though.
> Gold adds the APLT into the .plt section rather than creating a new
> .plt.bnd section, and that seems to be preventing objdump and gdb from
> correctly symbolizing some of the code, but I'd hope those can be
> fixed so that they don't depend on having two (or three) separate .plt
> sections in the executable.
Ld is similar. The difference is there is an entry in section table for
the second PLT. There is no difference in memory layout.