[PATCH] D19272: [ELF] - linkerscript AT keyword (in output section description) implemented.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 12 06:32:08 PDT 2016


davide added a comment.

In https://reviews.llvm.org/D19272#513746, @davide wrote:

> In https://reviews.llvm.org/D19272#513530, @grimar wrote:
>
> > In https://reviews.llvm.org/D19272#512904, @emaste wrote:
> >
> > > FYI the linker script parser now handles all of the FreeBSD kernel linker script except for `AT`. Now the only kernel linker script workaround in my test FreeBSD tree is:
> > >
> > >   diff --git a/sys/conf/ldscript.amd64 b/sys/conf/ldscript.amd64
> > >   index d445857..3efca9a 100644
> > >   --- a/sys/conf/ldscript.amd64
> > >   +++ b/sys/conf/ldscript.amd64
> > >   @@ -8,12 +8,7 @@ SECTIONS
> > >      /* Read-only sections, merged into text segment: */
> > >      kernphys = CONSTANT (MAXPAGESIZE);
> > >      . = kernbase + kernphys + SIZEOF_HEADERS;
> > >   -  /*
> > >   -   * Use the AT keyword in order to set the right LMA that contains
> > >   -   * the physical address where the section should be loaded. This is
> > >   -   * needed for the Xen loader which honours the LMA.
> > >   -   */
> > >   -  .interp         : AT (kernphys + SIZEOF_HEADERS) { *(.interp) }
> > >   +  .interp         : { *(.interp) }
> > >      .hash           : { *(.hash) }
> > >      .gnu.hash       : { *(.gnu.hash) }
> > >      .dynsym         : { *(.dynsym) }
> > >
> >
> >
> > Yes, I know. I am testing it with the same "change". I think 10.3 release sources head does not contain AT and I using them.
> >
> > I am not sure how to test properly that AT implementation is correct ? Since it is not important to have for FreeBSD.
>
>
> As far as I can tell the Xen loader in FreeBSD loader uses it. Eventually we might want to try (or ask somebody to try).
>  I think that getting X86-64 (and maybe other tier1 or tier2-almost-1 arches) to run is an higher priority (at least it is for me:))


But, to clarify, it's important :) (or at least there are some people using Xen which care about it =))


https://reviews.llvm.org/D19272





More information about the llvm-commits mailing list