[llvm-dev] Link using a linker script

Sky Flyer via llvm-dev llvm-dev at lists.llvm.org
Fri Apr 22 04:16:15 PDT 2016


Hi Rafael,

I changed the VAStart to 0x0 to have the memory layout from address zero (I
don't know how to use the AT in the linkerscript with LLVM lld). But the
result was that this time the .text section starts from 1000 instead of
11000.

Other problem, with linkerscript I would like to merge one custom section
to the .text section, but what I get at the end is just my custom section
renamed to .text without any merging.

Cheers,
ES



On Wed, Apr 20, 2016 at 9:33 PM, Rafael Espíndola <
rafael.espindola at gmail.com> wrote:

> Linker script support is still fairly incomplete.
>
> Can you open a bug explaining which feature you are trying to use and
> we are missing?
>
> In this particular case, can't you just list Boot.o first in the command
> line?
>
> Cheers,
> Rafael
>
> On 20 April 2016 at 15:13, Sky Flyer <skylake007 at gmail.com> wrote:
> > For example something like STARTUP
> > (http://wiki.osdev.org/Linker_Scripts#STARTUP) is not accepted by the
> LLVM
> > LLD. :-/
> >
> > On Wed, Apr 20, 2016 at 9:08 PM, Sky Flyer <skylake007 at gmail.com> wrote:
> >>
> >> Yeah I found it, that's nice. Thanks a milion.
> >> Could you please tell me how can I specify my bootstrap (startup code)
> in
> >> the linking process?
> >>
> >>
> >> On Wed, Apr 20, 2016 at 8:38 PM, Rafael Espíndola
> >> <rafael.espindola at gmail.com> wrote:
> >>>
> >>> search for VAStart.
> >>>
> >>> Cheers,
> >>> Rafael
> >>>
> >>>
> >>> On 20 April 2016 at 14:18, Sky Flyer <skylake007 at gmail.com> wrote:
> >>> > Hi Rafael,
> >>> >
> >>> > Thanks a lot.
> >>> > For example the start entry for me is 0x11000 by default which I
> don't
> >>> > know
> >>> > where it come from! I thought there should be a default thing that
> sets
> >>> > this
> >>> > entry address.
> >>> >
> >>> > On Wed, Apr 20, 2016 at 8:05 PM, Rafael Espíndola
> >>> > <rafael.espindola at gmail.com> wrote:
> >>> >>
> >>> >> There is no default linker script.
> >>> >>
> >>> >> Cheers,
> >>> >> Rafael
> >>> >>
> >>> >>
> >>> >> On 20 April 2016 at 11:23, Sky Flyer via llvm-dev
> >>> >> <llvm-dev at lists.llvm.org> wrote:
> >>> >> > for instance, where is the internal default linker script located?
> >>> >> > How
> >>> >> > can I
> >>> >> > change the default values, for example the star address...
> >>> >> >
> >>> >> > On Wed, Apr 20, 2016 at 5:17 PM, Sky Flyer <skylake007 at gmail.com>
> >>> >> > wrote:
> >>> >> >>
> >>> >> >> Hi all,
> >>> >> >>
> >>> >> >> How does the new lld implementation work with the "Linker Script"
> >>> >> >> for
> >>> >> >> the
> >>> >> >> object file adjustment?
> >>> >> >> I couldn't find enough resources on the web. Any help is highly
> >>> >> >> appreciated.
> >>> >> >>
> >>> >> >> Cheers,
> >>> >> >> ES
> >>> >> >
> >>> >> >
> >>> >> >
> >>> >> > _______________________________________________
> >>> >> > LLVM Developers mailing list
> >>> >> > llvm-dev at lists.llvm.org
> >>> >> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
> >>> >> >
> >>> >
> >>> >
> >>
> >>
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160422/503bb716/attachment.html>


More information about the llvm-dev mailing list