diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-08-27 23:40:14 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-08-27 23:40:54 +0200 |
commit | 7d642c99641ffc6960c8dd9ea88634bdaae80213 (patch) | |
tree | b4c8e3085b1ef3800c33006c7c6c50464a27dd83 /x86_64/ldscript | |
parent | 9acc5293e0386bfc0c505ac2efd287e610e7b662 (diff) | |
download | gnumach-7d642c99641ffc6960c8dd9ea88634bdaae80213.tar.gz gnumach-7d642c99641ffc6960c8dd9ea88634bdaae80213.tar.bz2 gnumach-7d642c99641ffc6960c8dd9ea88634bdaae80213.zip |
Fix building x86_64 xen platform
On Xen we do not have a separate boot section, we directly start at the
kernel map address. We thus do not have a map shift.
Diffstat (limited to 'x86_64/ldscript')
-rw-r--r-- | x86_64/ldscript | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/x86_64/ldscript b/x86_64/ldscript index de99795e..67703b4d 100644 --- a/x86_64/ldscript +++ b/x86_64/ldscript @@ -12,16 +12,16 @@ SECTIONS * `gnumach_LINKFLAGS' in `i386/Makefrag.am'. */ - . = _START_MAP; - .boot : + . = _START; + .boot : AT(_START_MAP) { *(.boot.text) *(.boot.data) } =0x90909090 - . += KERNEL_MAP_BASE; + . += KERNEL_MAP_SHIFT; _start = .; - .text : AT(((ADDR(.text)) - KERNEL_MAP_BASE)) + .text : AT(((ADDR(.text)) - KERNEL_MAP_SHIFT)) { *(.text*) *(.text .stub .text.* .gnu.linkonce.t.*) @@ -30,11 +30,11 @@ SECTIONS /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) } =0x90909090 - .init : AT(((ADDR(.init)) - KERNEL_MAP_BASE)) + .init : AT(((ADDR(.init)) - KERNEL_MAP_SHIFT)) { KEEP (*(.init)) } =0x90909090 - .fini : AT(((ADDR(.fini)) - KERNEL_MAP_BASE)) + .fini : AT(((ADDR(.fini)) - KERNEL_MAP_SHIFT)) { KEEP (*(.fini)) } =0x90909090 @@ -77,7 +77,7 @@ SECTIONS PROVIDE_HIDDEN (__rela_iplt_end = .); } .plt : { *(.plt) *(.iplt) } - .rodata : AT(((ADDR(.rodata)) - KERNEL_MAP_BASE)) { *(.rodata .rodata.* .gnu.linkonce.r.*) } + .rodata : AT(((ADDR(.rodata)) - KERNEL_MAP_SHIFT)) { *(.rodata .rodata.* .gnu.linkonce.r.*) } .rodata1 : { *(.rodata1) } .eh_frame_hdr : { *(.eh_frame_hdr) } .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } @@ -147,7 +147,7 @@ SECTIONS .got : { *(.got) *(.igot) } . = DATA_SEGMENT_RELRO_END (24, .); .got.plt : { *(.got.plt) *(.igot.plt) } - .data : AT(((ADDR(.data)) - KERNEL_MAP_BASE)) + .data : AT(((ADDR(.data)) - KERNEL_MAP_SHIFT)) { *(.data .data.* .gnu.linkonce.d.*) SORT(CONSTRUCTORS) @@ -155,7 +155,7 @@ SECTIONS .data1 : { *(.data1) } _edata = .; PROVIDE (edata = .); __bss_start = .; - .bss : AT(((ADDR(.bss)) - KERNEL_MAP_BASE)) + .bss : AT(((ADDR(.bss)) - KERNEL_MAP_SHIFT)) { *(.dynbss) *(.bss .bss.* .gnu.linkonce.b.*) |