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

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 12 00:13:52 PDT 2016


grimar added a comment.

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.


https://reviews.llvm.org/D19272





More information about the llvm-commits mailing list