This is the mail archive of the
mailing list for the binutils project.
Re: gold plugin support
- From: K Jski <bielsk1 at vt dot edu>
- To: Cary Coutant <ccoutant at google dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Mon, 24 Nov 2014 15:25:40 -0500
- Subject: Re: gold plugin support
- Authentication-results: sourceware.org; auth=none
- References: <CAH=yU0ag3yvgcVEpQMbN+oywHcXy5puV=QCpExUWn9cF+=JCRQ at mail dot gmail dot com> <CAHACq4q+nBGp6WidWcvuW4QCGDQ0dt5xQip-x=h+tMXsKJ3N8g at mail dot gmail dot com> <CAH=yU0bYyD3DTpaSYuCBwMhRBCunZfkcWgA_8--di9Q8Oc-L-A at mail dot gmail dot com> <CAH=yU0bksw3dYHCSaj9U1aoA+y=Dkv+J2G8K71ibwMaZA2Bf3A at mail dot gmail dot com>
Sorry for more emails, but I just wanted to clarify if there is any
other easier way then messing with the ld default linker script or
writing an "implicit-linker-script" for ld to pick up and hoping it
does what I want to accomplish of moving function symbols around.
(this is my current approach).
But if I am on the right track let me know. Thank you for your time.
On Mon, Nov 24, 2014 at 2:12 PM, K Jski <firstname.lastname@example.org> wrote:
> Dear Mr. Coutant,
> I have read through the API and did not find the hooks I needed to
> accomplish what I wanted (as you predicted). In this case, do you have
> any tips of how I could accomplish function-alignment via Gold?
> Thank you,
> C Jelesnianski
> On Fri, Nov 21, 2014 at 2:22 PM, K Jski <email@example.com> wrote:
>> Thanks for the quick response! I shall take a look the the API and see
>> if it helps
>> ~C Jelesnianski
>> On Fri, Nov 21, 2014 at 2:18 PM, Cary Coutant <firstname.lastname@example.org> wrote:
>>> The linker plugin API is described here:
>>> The header file in include/plugin-api.h also goes into some detail.
>>> It's implemented in both gold and the BFD ld.
>>> The API was designed for LTO (link-time optimization), so I'm not sure
>>> that it provides the hooks you'd need to do what you described.
>>> On Thu, Nov 20, 2014 at 11:21 AM, K Jski <email@example.com> wrote:
>>>> Dear BinUtils,
>>>> I am working on a custom function-address-aligner in order to produce
>>>> an aarch64 binary. I have already tried achieving this with the linaro
>>>> (4.9-2014.10 version to be exact) aarch64-toolchain utilizing their
>>>> aarch64-linux-gnu-ld with the --defsym flag without success. (it does
>>>> align but this causes my micro-test to segfault)
>>>> Another approach I had thought of was to write a gold plugin and use
>>>> gold to achieve though I'm having trouble finding any documentation on
>>>> this (like a tutorial for even a super simple plugin )
>>>> the first thing that comes up when I google is LLVM's gold plugin
>>>> which is not what I want I assume. I have dug though gold src code and
>>>> have found a plugin object but its leaving me with not much to work
>>>> Thank you,
>>>> C Jelesnianski