diff options
-rw-r--r-- | emulators/qemu-devel/Makefile | 38 | ||||
-rw-r--r-- | emulators/qemu-devel/distinfo | 4 | ||||
-rw-r--r-- | emulators/qemu-devel/files/patch-bsd-user-ld | 514 | ||||
-rw-r--r-- | emulators/qemu-devel/files/patch-configure-ld | 2528 | ||||
-rw-r--r-- | emulators/qemu-devel/files/patch-configure-ld-1a1c9ef4d3da2ff1965e8037d7d30b77884c869f | 36 | ||||
-rw-r--r-- | emulators/qemu-devel/files/patch-include-qemu-aes.h | 18 | ||||
-rw-r--r-- | emulators/qemu-devel/files/patch-include-qemu-common.h | 30 | ||||
-rw-r--r-- | emulators/qemu-devel/files/patch-ppc.ld | 41 | ||||
-rw-r--r-- | emulators/qemu-devel/files/patch-z9c-bsd-user-sson003c | 17 | ||||
-rw-r--r-- | emulators/qemu-devel/files/pcap-patch | 14 |
10 files changed, 2625 insertions, 615 deletions
diff --git a/emulators/qemu-devel/Makefile b/emulators/qemu-devel/Makefile index dcf7ae10c107..b548682fc6b1 100644 --- a/emulators/qemu-devel/Makefile +++ b/emulators/qemu-devel/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= qemu -PORTVERSION= 1.5.0 +PORTVERSION= 1.5.1 CATEGORIES= emulators MASTER_SITES= http://wiki.qemu.org/download/:release \ LOCAL/nox:snapshot @@ -13,12 +13,11 @@ DIST_SUBDIR= qemu/${PORTVERSION} MAINTAINER= nox@FreeBSD.org COMMENT= QEMU CPU Emulator - development version -LIB_DEPENDS= pixman-1:${PORTSDIR}/x11/pixman \ - curl:${PORTSDIR}/ftp/curl +LIB_DEPENDS= pixman-1:${PORTSDIR}/x11/pixman HAS_CONFIGURE= yes USE_BZIP2= yes -USE_GMAKE= yes +USES= gmake USE_PERL5_BUILD= yes USE_PYTHON_BUILD= yes USE_GNOME+= glib20 @@ -30,8 +29,8 @@ ONLY_FOR_ARCHS= amd64 i386 powerpc # XXX someone wants to debug sparc64 hosts? CONFLICTS_INSTALL= qemu-[0-9]* MAKE_JOBS_SAFE= yes -OPTIONS_DEFINE= SAMBA X11 OPENGL GNUTLS SASL JPEG PNG CDROM_DMA PCAP \ - USBREDIR GNS3 X86_TARGETS BSD_USER \ +OPTIONS_DEFINE= SAMBA X11 GTK OPENGL GNUTLS SASL JPEG PNG CURL \ + CDROM_DMA PCAP USBREDIR GNS3 X86_TARGETS BSD_USER \ STATIC_LINK DOCS SAMBA_DESC= samba dependency (for -smb) GNUTLS_DESC= gnutls dependency (vnc encryption) @@ -46,7 +45,7 @@ GNS3_DESC= gns3 patches (promiscuous multicast) X86_TARGETS_DESC= Don't build non-x86 system targets BSD_USER_DESC= Also build bsd-user targets (for testing) STATIC_LINK_DESC= Statically link the executables -OPTIONS_DEFAULT=X11 OPENGL GNUTLS SASL JPEG PNG CDROM_DMA PCAP +OPTIONS_DEFAULT=X11 GTK OPENGL GNUTLS SASL JPEG PNG CDROM_DMA CURL PCAP .include <bsd.port.options.mk> @@ -109,11 +108,16 @@ CONFIGURE_ARGS+= --prefix=${PREFIX} --cc=${CC} --enable-docs \ --extra-cflags=-I${WRKSRC}\ -I${LOCALBASE}/include\ -DPREFIX=\\\"${PREFIX}\\\" .if empty(PORT_OPTIONS:MX11) -CONFIGURE_ARGS+= --disable-gtk CONFIGURE_ARGS+= --disable-sdl -PLIST_SUB+= GTK="@comment " .else +CONFIGURE_ARGS+= --enable-sdl USE_SDL= sdl +.endif + +.if empty(PORT_OPTIONS:MGTK) +CONFIGURE_ARGS+= --disable-gtk +PLIST_SUB+= GTK="@comment " +.else USE_GNOME+= gtk20 vte USES+= gettext PLIST_SUB+= GTK="" @@ -143,6 +147,12 @@ CONFIGURE_ARGS+= --disable-vnc-png LIB_DEPENDS+= png15:${PORTSDIR}/graphics/png .endif +.if empty(PORT_OPTIONS:MCURL) +CONFIGURE_ARGS+= --disable-curl +.else +LIB_DEPENDS+= curl:${PORTSDIR}/ftp/curl +.endif + .if empty(PORT_OPTIONS:MOPENGL) CONFIGURE_ARGS+= --disable-glx .else @@ -161,6 +171,9 @@ CONFIGURE_ARGS+= --enable-pcap .endif .if ${PORT_OPTIONS:MSTATIC_LINK} +.if ${PORT_OPTIONS:MGTK} || ${PORT_OPTIONS:MX11} +IGNORE= X11 ui cannot be built static +.endif CONFIGURE_ARGS+= --static .endif @@ -196,14 +209,21 @@ CONFIGURE_ARGS+= --sparc_cpu=v9 .if ${OSVERSION} < 900033 BUILD_DEPENDS+= ${LOCALBASE}/bin/as:${PORTSDIR}/devel/binutils +CONFIGURE_ENV+= LD=${LOCALBASE}/bin/ld CONFIGURE_ENV+= COMPILER_PATH=${LOCALBASE}/bin MAKE_ENV+= COMPILER_PATH=${LOCALBASE}/bin .endif +# -lprocstat actually only _needs_ -lelf after r249666 or r250870 (MFC) +# but it shouldn't matter much post-patch: .if ${OSVERSION} < 900000 @${REINPLACE_CMD} -e '/LIBS/s|-lprocstat||' ${WRKSRC}/configure +.else + @${REINPLACE_CMD} -e '/LIBS/s|-lprocstat|-lprocstat -lelf|' \ + ${WRKSRC}/configure .endif + @${REINPLACE_CMD} -e '/libs_qga=/s|glib_libs|glib_libs -lintl|' ${WRKSRC}/configure .if ${PORT_OPTIONS:MPCAP} @cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/pcap-patch .endif diff --git a/emulators/qemu-devel/distinfo b/emulators/qemu-devel/distinfo index 1055a2512082..13037f452163 100644 --- a/emulators/qemu-devel/distinfo +++ b/emulators/qemu-devel/distinfo @@ -1,2 +1,2 @@ -SHA256 (qemu/1.5.0/qemu-1.5.0.tar.bz2) = b22b30ee9712568dfb4eedf76783f4a76546e1cbc41659b909646bcf0b4867bb -SIZE (qemu/1.5.0/qemu-1.5.0.tar.bz2) = 11931067 +SHA256 (qemu/1.5.1/qemu-1.5.1.tar.bz2) = 4c15a1ee2f387983eb5c1497f66bf567c34d14ba48517148f6eafef8ae09e3e8 +SIZE (qemu/1.5.1/qemu-1.5.1.tar.bz2) = 11931754 diff --git a/emulators/qemu-devel/files/patch-bsd-user-ld b/emulators/qemu-devel/files/patch-bsd-user-ld deleted file mode 100644 index fcc577c00063..000000000000 --- a/emulators/qemu-devel/files/patch-bsd-user-ld +++ /dev/null @@ -1,514 +0,0 @@ ---- a/ldscripts/x86_64.ld -+++ b/ldscripts/x86_64.ld -@@ -1,54 +1,58 @@ --/* Default linker script, for normal executables */ --OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64") -+/* Script for -z combreloc: combine and sort reloc sections */ -+OUTPUT_FORMAT("elf64-x86-64-freebsd", "elf64-x86-64-freebsd", -+ "elf64-x86-64-freebsd") - OUTPUT_ARCH(i386:x86-64) - ENTRY(_start) -+SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); - SECTIONS - { - /* Read-only sections, merged into text segment: */ -- . = 0x60000000 + SIZEOF_HEADERS; -+ PROVIDE (__executable_start = 0x60000000); . = 0x60000000 + SIZEOF_HEADERS; - .interp : { *(.interp) } - .hash : { *(.hash) } -+ .gnu.hash : { *(.gnu.hash) } - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } - .gnu.version : { *(.gnu.version) } - .gnu.version_d : { *(.gnu.version_d) } - .gnu.version_r : { *(.gnu.version_r) } -- .rel.init : { *(.rel.init) } -- .rela.init : { *(.rela.init) } -- .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } -- .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } -- .rel.fini : { *(.rel.fini) } -- .rela.fini : { *(.rela.fini) } -- .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } -- .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } -- .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } -- .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } -- .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } -- .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } -- .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } -- .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } -- .rel.ctors : { *(.rel.ctors) } -- .rela.ctors : { *(.rela.ctors) } -- .rel.dtors : { *(.rel.dtors) } -- .rela.dtors : { *(.rela.dtors) } -- .rel.got : { *(.rel.got) } -- .rela.got : { *(.rela.got) } -- .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } -- .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } -- .rel.plt : -- { -- *(.rel.plt) -- PROVIDE (__rel_iplt_start = .); -- *(.rel.iplt) -- PROVIDE (__rel_iplt_end = .); -- } -- .rela.plt : -- { -- *(.rela.plt) -- PROVIDE (__rela_iplt_start = .); -- *(.rela.iplt) -- PROVIDE (__rela_iplt_end = .); -- } -+ .rel.dyn : -+ { -+ *(.rel.init) -+ *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) -+ *(.rel.fini) -+ *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) -+ *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) -+ *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) -+ *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) -+ *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) -+ *(.rel.ctors) -+ *(.rel.dtors) -+ *(.rel.got) -+ *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) -+ *(.rel.ldata .rel.ldata.* .rel.gnu.linkonce.l.*) -+ *(.rel.lbss .rel.lbss.* .rel.gnu.linkonce.lb.*) -+ *(.rel.lrodata .rel.lrodata.* .rel.gnu.linkonce.lr.*) -+ } -+ .rela.dyn : -+ { -+ *(.rela.init) -+ *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) -+ *(.rela.fini) -+ *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) -+ *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) -+ *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) -+ *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) -+ *(.rela.ctors) -+ *(.rela.dtors) -+ *(.rela.got) -+ *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) -+ *(.rela.ldata .rela.ldata.* .rela.gnu.linkonce.l.*) -+ *(.rela.lbss .rela.lbss.* .rela.gnu.linkonce.lb.*) -+ *(.rela.lrodata .rela.lrodata.* .rela.gnu.linkonce.lr.*) -+ } -+ .rel.plt : { *(.rel.plt) } -+ .rela.plt : { *(.rela.plt) } - .init : - { - KEEP (*(.init)) -@@ -57,6 +61,7 @@ SECTIONS - .text : - { - *(.text .stub .text.* .gnu.linkonce.t.*) -+ KEEP (*(.text.*personality*)) - /* .gnu.warning sections are handled specially by elf32.em. */ - *(.gnu.warning) - } =0x90909090 -@@ -70,34 +75,37 @@ SECTIONS - .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } - .rodata1 : { *(.rodata1) } - .eh_frame_hdr : { *(.eh_frame_hdr) } -+ .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } -+ .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } - /* Adjust the address for the data segment. We want to adjust up to - the same address within the page on the next page up. */ -- . = ALIGN (0x100000) - ((0x100000 - .) & (0x100000 - 1)); . = DATA_SEGMENT_ALIGN (0x100000, 0x1000); -- /* Ensure the __preinit_array_start label is properly aligned. We -- could instead move the label definition inside the section, but -- the linker would then create the section even if it turns out to -- be empty, which isn't pretty. */ -- . = ALIGN(64 / 8); -- PROVIDE (__preinit_array_start = .); -- .preinit_array : { *(.preinit_array) } -- PROVIDE (__preinit_array_end = .); -- PROVIDE (__init_array_start = .); -- .init_array : { *(.init_array) } -- PROVIDE (__init_array_end = .); -- PROVIDE (__fini_array_start = .); -- .fini_array : { *(.fini_array) } -- PROVIDE (__fini_array_end = .); -- .data : -- { -- *(.data .data.* .gnu.linkonce.d.*) -- SORT(CONSTRUCTORS) -- } -- .data1 : { *(.data1) } -+ . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); -+ /* Exception handling */ -+ .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } -+ .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } -+ /* Thread Local Storage sections */ - .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } - .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } -- .eh_frame : { KEEP (*(.eh_frame)) } -- .gcc_except_table : { *(.gcc_except_table) } -- .dynamic : { *(.dynamic) } -+ .preinit_array : -+ { -+ PROVIDE_HIDDEN (__preinit_array_start = .); -+ KEEP (*(.preinit_array)) -+ PROVIDE_HIDDEN (__preinit_array_end = .); -+ } -+ .init_array : -+ { -+ PROVIDE_HIDDEN (__init_array_start = .); -+ KEEP (*(SORT(.init_array.*))) -+ KEEP (*(.init_array)) -+ PROVIDE_HIDDEN (__init_array_end = .); -+ } -+ .fini_array : -+ { -+ PROVIDE_HIDDEN (__fini_array_start = .); -+ KEEP (*(.fini_array)) -+ KEEP (*(SORT(.fini_array.*))) -+ PROVIDE_HIDDEN (__fini_array_end = .); -+ } - .ctors : - { - /* gcc uses crtbegin.o to find the start of -@@ -110,25 +118,37 @@ SECTIONS - doesn't matter which directory crtbegin.o - is in. */ - KEEP (*crtbegin.o(.ctors)) -+ KEEP (*crtbegin?.o(.ctors)) - /* We don't want to include the .ctor section from -- from the crtend.o file until after the sorted ctors. -+ the crtend.o file until after the sorted ctors. - The .ctor section from the crtend file contains the - end of ctors marker and it must be last */ -- KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors)) -+ KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors)) - KEEP (*(SORT(.ctors.*))) - KEEP (*(.ctors)) - } - .dtors : - { - KEEP (*crtbegin.o(.dtors)) -- KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors)) -+ KEEP (*crtbegin?.o(.dtors)) -+ KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) - KEEP (*(SORT(.dtors.*))) - KEEP (*(.dtors)) - } - .jcr : { KEEP (*(.jcr)) } -- .got : { *(.got.plt) *(.got) } -- _edata = .; -- PROVIDE (edata = .); -+ .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) } -+ .dynamic : { *(.dynamic) } -+ .got : { *(.got) } -+ . = DATA_SEGMENT_RELRO_END (24, .); -+ .got.plt : { *(.got.plt) } -+ .data : -+ { -+ *(.data .data.* .gnu.linkonce.d.*) -+ KEEP (*(.gnu.linkonce.d.*personality*)) -+ SORT(CONSTRUCTORS) -+ } -+ .data1 : { *(.data1) } -+ _edata = .; PROVIDE (edata = .); - __bss_start = .; - .bss : - { -@@ -137,12 +157,29 @@ SECTIONS - *(COMMON) - /* Align here to ensure that the .bss section occupies space up to - _end. Align after .bss to ensure correct alignment even if the -- .bss section disappears because there are no input sections. */ -- . = ALIGN(64 / 8); -+ .bss section disappears because there are no input sections. -+ FIXME: Why do we need it? When there is no .bss section, we don't -+ pad the .data section. */ -+ . = ALIGN(. != 0 ? 64 / 8 : 1); -+ } -+ .lbss : -+ { -+ *(.dynlbss) -+ *(.lbss .lbss.* .gnu.linkonce.lb.*) -+ *(LARGE_COMMON) -+ } -+ . = ALIGN(64 / 8); -+ .lrodata ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)) : -+ { -+ *(.lrodata .lrodata.* .gnu.linkonce.lr.*) -+ } -+ .ldata ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)) : -+ { -+ *(.ldata .ldata.* .gnu.linkonce.l.*) -+ . = ALIGN(. != 0 ? 64 / 8 : 1); - } - . = ALIGN(64 / 8); -- _end = .; -- PROVIDE (end = .); -+ _end = .; PROVIDE (end = .); - . = DATA_SEGMENT_END (.); - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } -@@ -177,4 +214,9 @@ SECTIONS - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } -+ /* DWARF 3 */ -+ .debug_pubtypes 0 : { *(.debug_pubtypes) } -+ .debug_ranges 0 : { *(.debug_ranges) } -+ .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } -+ /DISCARD/ : { *(.note.GNU-stack) } - } ---- a/ldscripts/i386.ld -+++ b/ldscripts/i386.ld -@@ -1,45 +1,47 @@ --/* ld script to make i386 Linux kernel -- * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>; -- */ --OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") -+OUTPUT_FORMAT("elf32-i386-freebsd", "elf32-i386-freebsd", -+ "elf32-i386-freebsd") - OUTPUT_ARCH(i386) - ENTRY(_start) - SECTIONS - { - /* Read-only sections, merged into text segment: */ -- . = 0x60000000 + SIZEOF_HEADERS; -- .interp : { *(.interp) } -- .hash : { *(.hash) } -- .dynsym : { *(.dynsym) } -- .dynstr : { *(.dynstr) } -- .gnu.version : { *(.gnu.version) } -- .gnu.version_d : { *(.gnu.version_d) } -- .gnu.version_r : { *(.gnu.version_r) } -- .rel.text : -- { *(.rel.text) *(.rel.gnu.linkonce.t*) } -- .rela.text : -- { *(.rela.text) *(.rela.gnu.linkonce.t*) } -- .rel.data : -- { *(.rel.data) *(.rel.gnu.linkonce.d*) } -- .rela.data : -- { *(.rela.data) *(.rela.gnu.linkonce.d*) } -- .rel.rodata : -- { *(.rel.rodata) *(.rel.gnu.linkonce.r*) } -- .rela.rodata : -- { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } -- .rel.got : { *(.rel.got) } -- .rela.got : { *(.rela.got) } -- .rel.ctors : { *(.rel.ctors) } -- .rela.ctors : { *(.rela.ctors) } -- .rel.dtors : { *(.rel.dtors) } -- .rela.dtors : { *(.rela.dtors) } -- .rel.init : { *(.rel.init) } -- .rela.init : { *(.rela.init) } -- .rel.fini : { *(.rel.fini) } -- .rela.fini : { *(.rela.fini) } -- .rel.bss : { *(.rel.bss) } -- .rela.bss : { *(.rela.bss) } -- .rel.plt : -+ PROVIDE (__executable_start = 0x60000000); . = 0x60000000 + SIZEOF_HEADERS; -+ .interp : { *(.interp) } -+ .hash : { *(.hash) } -+ .dynsym : { *(.dynsym) } -+ .dynstr : { *(.dynstr) } -+ .gnu.version : { *(.gnu.version) } -+ .gnu.version_d : { *(.gnu.version_d) } -+ .gnu.version_r : { *(.gnu.version_r) } -+ .rel.dyn : -+ { -+ *(.rel.init) -+ *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) -+ *(.rel.fini) -+ *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) -+ *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) -+ *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) -+ *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) -+ *(.rel.ctors) -+ *(.rel.dtors) -+ *(.rel.got) -+ *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) -+ } -+ .rela.dyn : -+ { -+ *(.rela.init) -+ *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) -+ *(.rela.fini) -+ *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) -+ *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) -+ *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) -+ *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) -+ *(.rela.ctors) -+ *(.rela.dtors) -+ *(.rela.got) -+ *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) -+ } -+ .rel.plt : - { - *(.rel.plt) - PROVIDE (__rel_iplt_start = .); -@@ -53,17 +55,34 @@ SECTIONS - *(.rela.iplt) - PROVIDE (__rela_iplt_end = .); - } -- .init : { *(.init) } =0x47ff041f -- .text : -+ .init : - { -- *(.text) -+ KEEP (*(.init)) -+ } =0x90909090 -+ .plt : { *(.plt) } -+ .text : -+ { -+ *(.text .stub .text.* .gnu.linkonce.t.*) - /* .gnu.warning sections are handled specially by elf32.em. */ - *(.gnu.warning) -- *(.gnu.linkonce.t*) -- } =0x47ff041f -- _etext = .; -+ } =0x90909090 -+ .fini : -+ { -+ KEEP (*(.fini)) -+ } =0x90909090 -+ PROVIDE (__etext = .); -+ PROVIDE (_etext = .); - PROVIDE (etext = .); -- .fini : { *(.fini) } =0x47ff041f -+ .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } -+ .rodata1 : { *(.rodata1) } -+ .eh_frame_hdr : { *(.eh_frame_hdr) } -+ /* Adjust the address for the data segment. We want to adjust up to -+ the same address within the page on the next page up. */ -+ . = ALIGN (0x1000) - ((0x1000 - .) & (0x1000 - 1)); . = DATA_SEGMENT_ALIGN (0x1000, 0x1000); -+ /* Ensure the __preinit_array_start label is properly aligned. We -+ could instead move the label definition inside the section, but -+ the linker would then create the section even if it turns out to -+ be empty, which isn't pretty. */ - . = ALIGN(32 / 8); - PROVIDE (__preinit_array_start = .); - .preinit_array : { *(.preinit_array) } -@@ -74,56 +93,71 @@ SECTIONS - PROVIDE (__fini_array_start = .); - .fini_array : { *(.fini_array) } - PROVIDE (__fini_array_end = .); -- .rodata : { *(.rodata) *(.gnu.linkonce.r*) } -- .rodata1 : { *(.rodata1) } -- .reginfo : { *(.reginfo) } -- /* Adjust the address for the data segment. We want to adjust up to -- the same address within the page on the next page up. */ -- . = ALIGN(0x100000) + (. & (0x100000 - 1)); -- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } -- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } -- .data : -+ .data : - { -- *(.data) -- *(.gnu.linkonce.d*) -- CONSTRUCTORS -+ *(.data .data.* .gnu.linkonce.d.*) -+ SORT(CONSTRUCTORS) - } -- .data1 : { *(.data1) } -- .ctors : -- { -- *(.ctors) -- } -- .dtors : -- { -- *(.dtors) -- } -- .plt : { *(.plt) } -- .got : { *(.got.plt) *(.got) } -- .dynamic : { *(.dynamic) } -- /* We want the small data sections together, so single-instruction offsets -- can access them all, and initialized data all before uninitialized, so -- we can shorten the on-disk segment size. */ -- .sdata : { *(.sdata) } -- _edata = .; -+ .data1 : { *(.data1) } -+ .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } -+ .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } -+ .eh_frame : { KEEP (*(.eh_frame)) } -+ .gcc_except_table : { *(.gcc_except_table) } -+ .dynamic : { *(.dynamic) } -+ .ctors : -+ { -+ /* gcc uses crtbegin.o to find the start of -+ the constructors, so we make sure it is -+ first. Because this is a wildcard, it -+ doesn't matter if the user does not -+ actually link against crtbegin.o; the -+ linker won't look for a file to match a -+ wildcard. The wildcard also means that it -+ doesn't matter which directory crtbegin.o -+ is in. */ -+ KEEP (*crtbegin*.o(.ctors)) -+ /* We don't want to include the .ctor section from -+ from the crtend.o file until after the sorted ctors. -+ The .ctor section from the crtend file contains the -+ end of ctors marker and it must be last */ -+ KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors)) -+ KEEP (*(SORT(.ctors.*))) -+ KEEP (*(.ctors)) -+ } -+ .dtors : -+ { -+ KEEP (*crtbegin*.o(.dtors)) -+ KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors)) -+ KEEP (*(SORT(.dtors.*))) -+ KEEP (*(.dtors)) -+ } -+ .jcr : { KEEP (*(.jcr)) } -+ .got : { *(.got.plt) *(.got) } -+ _edata = .; - PROVIDE (edata = .); - __bss_start = .; -- .sbss : { *(.sbss) *(.scommon) } -- .bss : -+ .bss : - { - *(.dynbss) -- *(.bss) -+ *(.bss .bss.* .gnu.linkonce.b.*) - *(COMMON) -+ /* Align here to ensure that the .bss section occupies space up to -+ _end. Align after .bss to ensure correct alignment even if the -+ .bss section disappears because there are no input sections. */ -+ . = ALIGN(32 / 8); - } -- _end = . ; -+ . = ALIGN(32 / 8); -+ _end = .; - PROVIDE (end = .); -+ . = DATA_SEGMENT_END (.); - /* Stabs debugging sections. */ -- .stab 0 : { *(.stab) } -- .stabstr 0 : { *(.stabstr) } -- .stab.excl 0 : { *(.stab.excl) } -- .stab.exclstr 0 : { *(.stab.exclstr) } -- .stab.index 0 : { *(.stab.index) } -+ .stab 0 : { *(.stab) } -+ .stabstr 0 : { *(.stabstr) } -+ .stab.excl 0 : { *(.stab.excl) } -+ .stab.exclstr 0 : { *(.stab.exclstr) } -+ .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } -- .comment 0 : { *(.comment) } -+ .comment 0 : { *(.comment) } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ -@@ -137,7 +171,7 @@ SECTIONS - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ -- .debug_info 0 : { *(.debug_info) } -+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } -@@ -149,5 +183,5 @@ SECTIONS - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } -- /* These must appear regardless of . */ -+ /DISCARD/ : { *(.note.GNU-stack) } - } diff --git a/emulators/qemu-devel/files/patch-configure-ld b/emulators/qemu-devel/files/patch-configure-ld new file mode 100644 index 000000000000..69c2999eb247 --- /dev/null +++ b/emulators/qemu-devel/files/patch-configure-ld @@ -0,0 +1,2528 @@ +diff --git a/configure b/configure +--- a/configure ++++ b/configure +@@ -4198,15 +4198,7 @@ fi + + # generate list of library paths for linker script + +-$ld --verbose -v 2> /dev/null | grep SEARCH_DIR > ${config_host_ld} + +-if test -f ${config_host_ld}~ ; then +- if cmp -s $config_host_ld ${config_host_ld}~ ; then +- mv ${config_host_ld}~ $config_host_ld +- else +- rm ${config_host_ld}~ +- fi +-fi + + # use included Linux headers + if test "$linux" = "yes" ; then +@@ -4578,21 +4578,33 @@ if test "$gprof" = "yes" ; then + fi + fi + +-if test "$ARCH" = "tci"; then +- linker_script="" +-else +- linker_script="-Wl,-T../config-host.ld -Wl,-T,\$(SRC_PATH)/ldscripts/\$(ARCH).ld" +-fi +- + if test "$target_linux_user" = "yes" -o "$target_bsd_user" = "yes" ; then ++ textseg_addr= + case "$ARCH" in +- alpha | s390x) +- # The default placement of the application is fine. +- ;; +- *) +- ldflags="$linker_script $ldflags" ++ arm | hppa | i386 | ia64 | m68k | ppc | ppc64 | s390 | sparc | sparc64 | x86_64) ++ default_textseg_addr=0x400000 ++ textseg_addr=0x60000000 ++ ;; ++ mips) ++ default_textseg_addr=0x120000000 ++ textseg_addr=0x400000 + ;; + esac ++ if [ -n "$textseg_addr" ]; then ++ try_ldflags="-Ttext-segment=$textseg_addr" ++ if $ld $try_ldflags /dev/null >/dev/null 2>&1; then ++ ldflags="$ldflags $try_ldflags" ++ else ++ # In case ld does not support -Ttext-segment, edit the default linker ++ # script via sed to set the .text start addr. This is needed on FreeBSD ++ # at least. ++ $ld --verbose | sed \ ++ -e '1,/==================================================/d' \ ++ -e '/==================================================/,$d' \ ++ -e "s/$default_textseg_addr/$textseg_addr/g" > config-host.ld ++ ldflags="$ldflags -Wl,-T../config-host.ld" ++ fi ++ fi + fi + + echo "LDFLAGS+=$ldflags" >> $config_target_mak +diff --git a/ldscripts/alpha.ld b/ldscripts/alpha.ld +deleted file mode 100644 +index 906d76b..0000000 +--- a/ldscripts/alpha.ld ++++ /dev/null +@@ -1,127 +0,0 @@ +-OUTPUT_FORMAT("elf64-alpha", "elf64-alpha", +- "elf64-alpha") +-OUTPUT_ARCH(alpha) +-ENTRY(__start) +-SECTIONS +-{ +- /* Read-only sections, merged into text segment: */ +- . = 0x60000000 + SIZEOF_HEADERS; +- .interp : { *(.interp) } +- .hash : { *(.hash) } +- .dynsym : { *(.dynsym) } +- .dynstr : { *(.dynstr) } +- .gnu.version : { *(.gnu.version) } +- .gnu.version_d : { *(.gnu.version_d) } +- .gnu.version_r : { *(.gnu.version_r) } +- .rel.text : +- { *(.rel.text) *(.rel.gnu.linkonce.t*) } +- .rela.text : +- { *(.rela.text) *(.rela.gnu.linkonce.t*) } +- .rel.data : +- { *(.rel.data) *(.rel.gnu.linkonce.d*) } +- .rela.data : +- { *(.rela.data) *(.rela.gnu.linkonce.d*) } +- .rel.rodata : +- { *(.rel.rodata) *(.rel.gnu.linkonce.r*) } +- .rela.rodata : +- { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } +- .rel.got : { *(.rel.got) } +- .rela.got : { *(.rela.got) } +- .rel.ctors : { *(.rel.ctors) } +- .rela.ctors : { *(.rela.ctors) } +- .rel.dtors : { *(.rel.dtors) } +- .rela.dtors : { *(.rela.dtors) } +- .rel.init : { *(.rel.init) } +- .rela.init : { *(.rela.init) } +- .rel.fini : { *(.rel.fini) } +- .rela.fini : { *(.rela.fini) } +- .rel.bss : { *(.rel.bss) } +- .rela.bss : { *(.rela.bss) } +- .rel.plt : { *(.rel.plt) } +- .rela.plt : { *(.rela.plt) } +- .init : { *(.init) } =0x47ff041f +- .text : +- { +- *(.text) +- /* .gnu.warning sections are handled specially by elf32.em. */ +- *(.gnu.warning) +- *(.gnu.linkonce.t*) +- } =0x47ff041f +- _etext = .; +- PROVIDE (etext = .); +- .fini : { *(.fini) } =0x47ff041f +- .rodata : { *(.rodata) *(.gnu.linkonce.r*) } +- .rodata1 : { *(.rodata1) } +- .reginfo : { *(.reginfo) } +- /* Adjust the address for the data segment. We want to adjust up to +- the same address within the page on the next page up. */ +- . = ALIGN(0x100000) + (. & (0x100000 - 1)); +- .data : +- { +- *(.data) +- *(.gnu.linkonce.d*) +- CONSTRUCTORS +- } +- .data1 : { *(.data1) } +- .ctors : +- { +- *(.ctors) +- } +- .dtors : +- { +- *(.dtors) +- } +- .plt : { *(.plt) } +- .got : { *(.got.plt) *(.got) } +- .dynamic : { *(.dynamic) } +- /* We want the small data sections together, so single-instruction offsets +- can access them all, and initialized data all before uninitialized, so +- we can shorten the on-disk segment size. */ +- .sdata : { *(.sdata) } +- _edata = .; +- PROVIDE (edata = .); +- __bss_start = .; +- .sbss : { *(.sbss) *(.scommon) } +- .bss : +- { +- *(.dynbss) +- *(.bss) +- *(COMMON) +- } +- _end = . ; +- PROVIDE (end = .); +- /* Stabs debugging sections. */ +- .stab 0 : { *(.stab) } +- .stabstr 0 : { *(.stabstr) } +- .stab.excl 0 : { *(.stab.excl) } +- .stab.exclstr 0 : { *(.stab.exclstr) } +- .stab.index 0 : { *(.stab.index) } +- .stab.indexstr 0 : { *(.stab.indexstr) } +- .comment 0 : { *(.comment) } +- /* DWARF debug sections. +- Symbols in the DWARF debugging sections are relative to the beginning +- of the section so we begin them at 0. */ +- /* DWARF 1 */ +- .debug 0 : { *(.debug) } +- .line 0 : { *(.line) } +- /* GNU DWARF 1 extensions */ +- .debug_srcinfo 0 : { *(.debug_srcinfo) } +- .debug_sfnames 0 : { *(.debug_sfnames) } +- /* DWARF 1.1 and DWARF 2 */ +- .debug_aranges 0 : { *(.debug_aranges) } +- .debug_pubnames 0 : { *(.debug_pubnames) } +- /* DWARF 2 */ +- .debug_info 0 : { *(.debug_info) } +- .debug_abbrev 0 : { *(.debug_abbrev) } +- .debug_line 0 : { *(.debug_line) } +- .debug_frame 0 : { *(.debug_frame) } +- .debug_str 0 : { *(.debug_str) } +- .debug_loc 0 : { *(.debug_loc) } +- .debug_macinfo 0 : { *(.debug_macinfo) } +- /* SGI/MIPS DWARF 2 extensions */ +- .debug_weaknames 0 : { *(.debug_weaknames) } +- .debug_funcnames 0 : { *(.debug_funcnames) } +- .debug_typenames 0 : { *(.debug_typenames) } +- .debug_varnames 0 : { *(.debug_varnames) } +- /* These must appear regardless of . */ +-} +diff --git a/ldscripts/arm.ld b/ldscripts/arm.ld +deleted file mode 100644 +index 7f13da9..0000000 +--- a/ldscripts/arm.ld ++++ /dev/null +@@ -1,153 +0,0 @@ +-OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", +- "elf32-littlearm") +-OUTPUT_ARCH(arm) +-ENTRY(_start) +-SECTIONS +-{ +- /* Read-only sections, merged into text segment: */ +- . = 0x60000000 + SIZEOF_HEADERS; +- .interp : { *(.interp) } +- .hash : { *(.hash) } +- .dynsym : { *(.dynsym) } +- .dynstr : { *(.dynstr) } +- .gnu.version : { *(.gnu.version) } +- .gnu.version_d : { *(.gnu.version_d) } +- .gnu.version_r : { *(.gnu.version_r) } +- .rel.text : +- { *(.rel.text) *(.rel.gnu.linkonce.t*) } +- .rela.text : +- { *(.rela.text) *(.rela.gnu.linkonce.t*) } +- .rel.data : +- { *(.rel.data) *(.rel.gnu.linkonce.d*) } +- .rela.data : +- { *(.rela.data) *(.rela.gnu.linkonce.d*) } +- .rel.rodata : +- { *(.rel.rodata) *(.rel.gnu.linkonce.r*) } +- .rela.rodata : +- { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } +- .rel.got : { *(.rel.got) } +- .rela.got : { *(.rela.got) } +- .rel.ctors : { *(.rel.ctors) } +- .rela.ctors : { *(.rela.ctors) } +- .rel.dtors : { *(.rel.dtors) } +- .rela.dtors : { *(.rela.dtors) } +- .rel.init : { *(.rel.init) } +- .rela.init : { *(.rela.init) } +- .rel.fini : { *(.rel.fini) } +- .rela.fini : { *(.rela.fini) } +- .rel.bss : { *(.rel.bss) } +- .rela.bss : { *(.rela.bss) } +- .rel.plt : { *(.rel.plt) } +- .rela.plt : { *(.rela.plt) } +- .init : { *(.init) } =0x47ff041f +- .text : +- { +- *(.text) +- /* .gnu.warning sections are handled specially by elf32.em. */ +- *(.gnu.warning) +- *(.gnu.linkonce.t*) +- } =0x47ff041f +- _etext = .; +- PROVIDE (etext = .); +- .fini : { *(.fini) } =0x47ff041f +- .rodata : { *(.rodata) *(.gnu.linkonce.r*) } +- .rodata1 : { *(.rodata1) } +- .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } +- __exidx_start = .; +- .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } +- __exidx_end = .; +- .reginfo : { *(.reginfo) } +- /* Adjust the address for the data segment. We want to adjust up to +- the same address within the page on the next page up. */ +- . = ALIGN(0x100000) + (. & (0x100000 - 1)); +- .data : +- { +- *(.gen_code) +- *(.data) +- *(.gnu.linkonce.d*) +- CONSTRUCTORS +- } +- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } +- .data1 : { *(.data1) } +- .preinit_array : +- { +- PROVIDE (__preinit_array_start = .); +- KEEP (*(.preinit_array)) +- PROVIDE (__preinit_array_end = .); +- } +- .init_array : +- { +- PROVIDE (__init_array_start = .); +- KEEP (*(SORT(.init_array.*))) +- KEEP (*(.init_array)) +- PROVIDE (__init_array_end = .); +- } +- .fini_array : +- { +- PROVIDE (__fini_array_start = .); +- KEEP (*(.fini_array)) +- KEEP (*(SORT(.fini_array.*))) +- PROVIDE (__fini_array_end = .); +- } +- .ctors : +- { +- *(.ctors) +- } +- .dtors : +- { +- *(.dtors) +- } +- .plt : { *(.plt) } +- .got : { *(.got.plt) *(.got) } +- .dynamic : { *(.dynamic) } +- /* We want the small data sections together, so single-instruction offsets +- can access them all, and initialized data all before uninitialized, so +- we can shorten the on-disk segment size. */ +- .sdata : { *(.sdata) } +- _edata = .; +- PROVIDE (edata = .); +- __bss_start = .; +- .sbss : { *(.sbss) *(.scommon) } +- .bss : +- { +- *(.dynbss) +- *(.bss) +- *(COMMON) +- } +- _end = . ; +- PROVIDE (end = .); +- /* Stabs debugging sections. */ +- .stab 0 : { *(.stab) } +- .stabstr 0 : { *(.stabstr) } +- .stab.excl 0 : { *(.stab.excl) } +- .stab.exclstr 0 : { *(.stab.exclstr) } +- .stab.index 0 : { *(.stab.index) } +- .stab.indexstr 0 : { *(.stab.indexstr) } +- .comment 0 : { *(.comment) } +- /* DWARF debug sections. +- Symbols in the DWARF debugging sections are relative to the beginning +- of the section so we begin them at 0. */ +- /* DWARF 1 */ +- .debug 0 : { *(.debug) } +- .line 0 : { *(.line) } +- /* GNU DWARF 1 extensions */ +- .debug_srcinfo 0 : { *(.debug_srcinfo) } +- .debug_sfnames 0 : { *(.debug_sfnames) } +- /* DWARF 1.1 and DWARF 2 */ +- .debug_aranges 0 : { *(.debug_aranges) } +- .debug_pubnames 0 : { *(.debug_pubnames) } +- /* DWARF 2 */ +- .debug_info 0 : { *(.debug_info) } +- .debug_abbrev 0 : { *(.debug_abbrev) } +- .debug_line 0 : { *(.debug_line) } +- .debug_frame 0 : { *(.debug_frame) } +- .debug_str 0 : { *(.debug_str) } +- .debug_loc 0 : { *(.debug_loc) } +- .debug_macinfo 0 : { *(.debug_macinfo) } +- /* SGI/MIPS DWARF 2 extensions */ +- .debug_weaknames 0 : { *(.debug_weaknames) } +- .debug_funcnames 0 : { *(.debug_funcnames) } +- .debug_typenames 0 : { *(.debug_typenames) } +- .debug_varnames 0 : { *(.debug_varnames) } +- /* These must appear regardless of . */ +-} +diff --git a/ldscripts/hppa.ld b/ldscripts/hppa.ld +deleted file mode 100644 +index 3555b3e..0000000 +--- a/ldscripts/hppa.ld ++++ /dev/null +@@ -1,211 +0,0 @@ +-/* Default linker script, for normal executables */ +-OUTPUT_FORMAT("elf32-hppa-linux", "elf32-hppa-linux", +- "elf32-hppa-linux") +-OUTPUT_ARCH(hppa:hppa1.1) +-ENTRY(_start) +-SECTIONS +-{ +- /* Read-only sections, merged into text segment: */ +- PROVIDE (__executable_start = 0x60000000); . = 0x60000000 + SIZEOF_HEADERS; +- .interp : { *(.interp) } +- .hash : { *(.hash) } +- .dynsym : { *(.dynsym) } +- .dynstr : { *(.dynstr) } +- .gnu.version : { *(.gnu.version) } +- .gnu.version_d : { *(.gnu.version_d) } +- .gnu.version_r : { *(.gnu.version_r) } +- .rel.init : { *(.rel.init) } +- .rela.init : { *(.rela.init) } +- .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } +- .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } +- .rel.fini : { *(.rel.fini) } +- .rela.fini : { *(.rela.fini) } +- .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } +- .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } +- .rel.data.rel.ro : { *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) } +- .rela.data.rel.ro : { *(.rela.data.rel.ro* .rela.gnu.linkonce.d.rel.ro.*) } +- .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } +- .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } +- .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } +- .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } +- .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } +- .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } +- .rel.ctors : { *(.rel.ctors) } +- .rela.ctors : { *(.rela.ctors) } +- .rel.dtors : { *(.rel.dtors) } +- .rela.dtors : { *(.rela.dtors) } +- .rel.got : { *(.rel.got) } +- .rela.got : { *(.rela.got) } +- .rel.sdata : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) } +- .rela.sdata : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) } +- .rel.sbss : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) } +- .rela.sbss : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) } +- .rel.sdata2 : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) } +- .rela.sdata2 : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) } +- .rel.sbss2 : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) } +- .rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) } +- .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } +- .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } +- .rel.plt : { *(.rel.plt) } +- .rela.plt : { *(.rela.plt) } +- .init : +- { +- KEEP (*(.init)) +- } =0x08000240 +- .text : +- { +- *(.text .stub .text.* .gnu.linkonce.t.*) +- KEEP (*(.text.*personality*)) +- /* .gnu.warning sections are handled specially by elf32.em. */ +- *(.gnu.warning) +- } =0x08000240 +- .fini : +- { +- KEEP (*(.fini)) +- } =0x08000240 +- PROVIDE (__etext = .); +- PROVIDE (_etext = .); +- PROVIDE (etext = .); +- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } +- .rodata1 : { *(.rodata1) } +- .sdata2 : +- { +- *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) +- } +- .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) } +- .PARISC.unwind : { *(.PARISC.unwind) } +- .eh_frame_hdr : { *(.eh_frame_hdr) } +- /* Adjust the address for the data segment. We want to adjust up to +- the same address within the page on the next page up. */ +- . = ALIGN(0x10000) + (. & (0x10000 - 1)); +- /* Exception handling */ +- .eh_frame : { KEEP (*(.eh_frame)) } +- .gcc_except_table : { *(.gcc_except_table .gcc_except_table.*) } +- /* Thread Local Storage sections */ +- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } +- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } +- .preinit_array : +- { +- PROVIDE (__preinit_array_start = .); +- KEEP (*(.preinit_array)) +- PROVIDE (__preinit_array_end = .); +- } +- .init_array : +- { +- PROVIDE (__init_array_start = .); +- KEEP (*(SORT(.init_array.*))) +- KEEP (*(.init_array)) +- PROVIDE (__init_array_end = .); +- } +- .fini_array : +- { +- PROVIDE (__fini_array_start = .); +- KEEP (*(.fini_array)) +- KEEP (*(SORT(.fini_array.*))) +- PROVIDE (__fini_array_end = .); +- } +- .ctors : +- { +- /* gcc uses crtbegin.o to find the start of +- the constructors, so we make sure it is +- first. Because this is a wildcard, it +- doesn't matter if the user does not +- actually link against crtbegin.o; the +- linker won't look for a file to match a +- wildcard. The wildcard also means that it +- doesn't matter which directory crtbegin.o +- is in. */ +- KEEP (*crtbegin*.o(.ctors)) +- /* We don't want to include the .ctor section from +- the crtend.o file until after the sorted ctors. +- The .ctor section from the crtend file contains the +- end of ctors marker and it must be last */ +- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors)) +- KEEP (*(SORT(.ctors.*))) +- KEEP (*(.ctors)) +- } +- .dtors : +- { +- KEEP (*crtbegin*.o(.dtors)) +- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors)) +- KEEP (*(SORT(.dtors.*))) +- KEEP (*(.dtors)) +- } +- .jcr : { KEEP (*(.jcr)) } +- .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) } +- .dynamic : { *(.dynamic) } +- .data : +- { +- PROVIDE ($global$ = .); +- *(.data .data.* .gnu.linkonce.d.*) +- KEEP (*(.gnu.linkonce.d.*personality*)) +- SORT(CONSTRUCTORS) +- } +- .data1 : { *(.data1) } +- .plt : { *(.plt) } +- .got : { *(.got.plt) *(.got) } +- /* We want the small data sections together, so single-instruction offsets +- can access them all, and initialized data all before uninitialized, so +- we can shorten the on-disk segment size. */ +- .sdata : +- { +- *(.sdata .sdata.* .gnu.linkonce.s.*) +- } +- _edata = .; PROVIDE (edata = .); +- __bss_start = .; +- .sbss : +- { +- *(.dynsbss) +- *(.sbss .sbss.* .gnu.linkonce.sb.*) +- *(.scommon) +- } +- .bss : +- { +- *(.dynbss) +- *(.bss .bss.* .gnu.linkonce.b.*) +- *(COMMON) +- /* Align here to ensure that the .bss section occupies space up to +- _end. Align after .bss to ensure correct alignment even if the +- .bss section disappears because there are no input sections. +- FIXME: Why do we need it? When there is no .bss section, we don't +- pad the .data section. */ +- . = ALIGN(. != 0 ? 32 / 8 : 1); +- } +- . = ALIGN(32 / 8); +- . = ALIGN(32 / 8); +- _end = .; PROVIDE (end = .); +- /* Stabs debugging sections. */ +- .stab 0 : { *(.stab) } +- .stabstr 0 : { *(.stabstr) } +- .stab.excl 0 : { *(.stab.excl) } +- .stab.exclstr 0 : { *(.stab.exclstr) } +- .stab.index 0 : { *(.stab.index) } +- .stab.indexstr 0 : { *(.stab.indexstr) } +- .comment 0 : { *(.comment) } +- /* DWARF debug sections. +- Symbols in the DWARF debugging sections are relative to the beginning +- of the section so we begin them at 0. */ +- /* DWARF 1 */ +- .debug 0 : { *(.debug) } +- .line 0 : { *(.line) } +- /* GNU DWARF 1 extensions */ +- .debug_srcinfo 0 : { *(.debug_srcinfo) } +- .debug_sfnames 0 : { *(.debug_sfnames) } +- /* DWARF 1.1 and DWARF 2 */ +- .debug_aranges 0 : { *(.debug_aranges) } +- .debug_pubnames 0 : { *(.debug_pubnames) } +- /* DWARF 2 */ +- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } +- .debug_abbrev 0 : { *(.debug_abbrev) } +- .debug_line 0 : { *(.debug_line) } +- .debug_frame 0 : { *(.debug_frame) } +- .debug_str 0 : { *(.debug_str) } +- .debug_loc 0 : { *(.debug_loc) } +- .debug_macinfo 0 : { *(.debug_macinfo) } +- /* SGI/MIPS DWARF 2 extensions */ +- .debug_weaknames 0 : { *(.debug_weaknames) } +- .debug_funcnames 0 : { *(.debug_funcnames) } +- .debug_typenames 0 : { *(.debug_typenames) } +- .debug_varnames 0 : { *(.debug_varnames) } +- /DISCARD/ : { *(.note.GNU-stack) } +-} +diff --git a/ldscripts/i386.ld b/ldscripts/i386.ld +deleted file mode 100644 +index cc3f160..0000000 +--- a/ldscripts/i386.ld ++++ /dev/null +@@ -1,153 +0,0 @@ +-/* ld script to make i386 Linux kernel +- * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>; +- */ +-OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") +-OUTPUT_ARCH(i386) +-ENTRY(_start) +-SECTIONS +-{ +- /* Read-only sections, merged into text segment: */ +- . = 0x60000000 + SIZEOF_HEADERS; +- .interp : { *(.interp) } +- .hash : { *(.hash) } +- .dynsym : { *(.dynsym) } +- .dynstr : { *(.dynstr) } +- .gnu.version : { *(.gnu.version) } +- .gnu.version_d : { *(.gnu.version_d) } +- .gnu.version_r : { *(.gnu.version_r) } +- .rel.text : +- { *(.rel.text) *(.rel.gnu.linkonce.t*) } +- .rela.text : +- { *(.rela.text) *(.rela.gnu.linkonce.t*) } +- .rel.data : +- { *(.rel.data) *(.rel.gnu.linkonce.d*) } +- .rela.data : +- { *(.rela.data) *(.rela.gnu.linkonce.d*) } +- .rel.rodata : +- { *(.rel.rodata) *(.rel.gnu.linkonce.r*) } +- .rela.rodata : +- { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } +- .rel.got : { *(.rel.got) } +- .rela.got : { *(.rela.got) } +- .rel.ctors : { *(.rel.ctors) } +- .rela.ctors : { *(.rela.ctors) } +- .rel.dtors : { *(.rel.dtors) } +- .rela.dtors : { *(.rela.dtors) } +- .rel.init : { *(.rel.init) } +- .rela.init : { *(.rela.init) } +- .rel.fini : { *(.rel.fini) } +- .rela.fini : { *(.rela.fini) } +- .rel.bss : { *(.rel.bss) } +- .rela.bss : { *(.rela.bss) } +- .rel.plt : +- { +- *(.rel.plt) +- PROVIDE (__rel_iplt_start = .); +- *(.rel.iplt) +- PROVIDE (__rel_iplt_end = .); +- } +- .rela.plt : +- { +- *(.rela.plt) +- PROVIDE (__rela_iplt_start = .); +- *(.rela.iplt) +- PROVIDE (__rela_iplt_end = .); +- } +- .init : { *(.init) } =0x47ff041f +- .text : +- { +- *(.text) +- /* .gnu.warning sections are handled specially by elf32.em. */ +- *(.gnu.warning) +- *(.gnu.linkonce.t*) +- } =0x47ff041f +- _etext = .; +- PROVIDE (etext = .); +- .fini : { *(.fini) } =0x47ff041f +- . = ALIGN(32 / 8); +- PROVIDE (__preinit_array_start = .); +- .preinit_array : { *(.preinit_array) } +- PROVIDE (__preinit_array_end = .); +- PROVIDE (__init_array_start = .); +- .init_array : { *(.init_array) } +- PROVIDE (__init_array_end = .); +- PROVIDE (__fini_array_start = .); +- .fini_array : { *(.fini_array) } +- PROVIDE (__fini_array_end = .); +- .rodata : { *(.rodata) *(.gnu.linkonce.r*) } +- .rodata1 : { *(.rodata1) } +- .reginfo : { *(.reginfo) } +- /* Adjust the address for the data segment. We want to adjust up to +- the same address within the page on the next page up. */ +- . = ALIGN(0x100000) + (. & (0x100000 - 1)); +- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } +- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } +- .data : +- { +- *(.data) +- *(.gnu.linkonce.d*) +- CONSTRUCTORS +- } +- .data1 : { *(.data1) } +- .ctors : +- { +- *(.ctors) +- } +- .dtors : +- { +- *(.dtors) +- } +- .plt : { *(.plt) } +- .got : { *(.got.plt) *(.got) } +- .dynamic : { *(.dynamic) } +- /* We want the small data sections together, so single-instruction offsets +- can access them all, and initialized data all before uninitialized, so +- we can shorten the on-disk segment size. */ +- .sdata : { *(.sdata) } +- _edata = .; +- PROVIDE (edata = .); +- __bss_start = .; +- .sbss : { *(.sbss) *(.scommon) } +- .bss : +- { +- *(.dynbss) +- *(.bss) +- *(COMMON) +- } +- _end = . ; +- PROVIDE (end = .); +- /* Stabs debugging sections. */ +- .stab 0 : { *(.stab) } +- .stabstr 0 : { *(.stabstr) } +- .stab.excl 0 : { *(.stab.excl) } +- .stab.exclstr 0 : { *(.stab.exclstr) } +- .stab.index 0 : { *(.stab.index) } +- .stab.indexstr 0 : { *(.stab.indexstr) } +- .comment 0 : { *(.comment) } +- /* DWARF debug sections. +- Symbols in the DWARF debugging sections are relative to the beginning +- of the section so we begin them at 0. */ +- /* DWARF 1 */ +- .debug 0 : { *(.debug) } +- .line 0 : { *(.line) } +- /* GNU DWARF 1 extensions */ +- .debug_srcinfo 0 : { *(.debug_srcinfo) } +- .debug_sfnames 0 : { *(.debug_sfnames) } +- /* DWARF 1.1 and DWARF 2 */ +- .debug_aranges 0 : { *(.debug_aranges) } +- .debug_pubnames 0 : { *(.debug_pubnames) } +- /* DWARF 2 */ +- .debug_info 0 : { *(.debug_info) } +- .debug_abbrev 0 : { *(.debug_abbrev) } +- .debug_line 0 : { *(.debug_line) } +- .debug_frame 0 : { *(.debug_frame) } +- .debug_str 0 : { *(.debug_str) } +- .debug_loc 0 : { *(.debug_loc) } +- .debug_macinfo 0 : { *(.debug_macinfo) } +- /* SGI/MIPS DWARF 2 extensions */ +- .debug_weaknames 0 : { *(.debug_weaknames) } +- .debug_funcnames 0 : { *(.debug_funcnames) } +- .debug_typenames 0 : { *(.debug_typenames) } +- .debug_varnames 0 : { *(.debug_varnames) } +- /* These must appear regardless of . */ +-} +diff --git a/ldscripts/ia64.ld b/ldscripts/ia64.ld +deleted file mode 100644 +index 0c37796..0000000 +--- a/ldscripts/ia64.ld ++++ /dev/null +@@ -1,209 +0,0 @@ +-/* Default linker script, for normal executables */ +-OUTPUT_FORMAT("elf64-ia64-little", "elf64-ia64-little", +- "elf64-ia64-little") +-OUTPUT_ARCH(ia64) +-ENTRY(_start) +-/* __DYNAMIC = 0; */ +-SECTIONS +-{ +- /* Read-only sections, merged into text segment: */ +- PROVIDE (__executable_start = 0x60000000); . = 0x60000000 + SIZEOF_HEADERS; +- .interp : { *(.interp) } +- .hash : { *(.hash) } +- .dynsym : { *(.dynsym) } +- .dynstr : { *(.dynstr) } +- .gnu.version : { *(.gnu.version) } +- .gnu.version_d : { *(.gnu.version_d) } +- .gnu.version_r : { *(.gnu.version_r) } +- .rel.init : { *(.rel.init) } +- .rela.init : { *(.rela.init) } +- .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } +- .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } +- .rel.fini : { *(.rel.fini) } +- .rela.fini : { *(.rela.fini) } +- .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } +- .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } +- .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } +- .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } +- .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } +- .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } +- .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } +- .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } +- .rel.ctors : { *(.rel.ctors) } +- .rela.ctors : { *(.rela.ctors) } +- .rel.dtors : { *(.rel.dtors) } +- .rela.dtors : { *(.rela.dtors) } +- .rel.got : { *(.rel.got) } +- .rela.got : { *(.rela.got) } +- .rel.sdata : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) } +- .rela.sdata : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) } +- .rel.sbss : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) } +- .rela.sbss : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) } +- .rel.sdata2 : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) } +- .rela.sdata2 : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) } +- .rel.sbss2 : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) } +- .rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) } +- .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } +- .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } +- .rel.plt : { *(.rel.plt) } +- .rela.plt : { *(.rela.plt) } +- .rela.IA_64.pltoff : { *(.rela.IA_64.pltoff) } +- .init : +- { +- KEEP (*(.init)) +- } =0x00300000010070000002000001000400 +- .plt : { *(.plt) } +- .text : +- { +- *(.text .stub .text.* .gnu.linkonce.t.*) +- /* .gnu.warning sections are handled specially by elf32.em. */ +- *(.gnu.warning) +- } =0x00300000010070000002000001000400 +- .fini : +- { +- KEEP (*(.fini)) +- } =0x00300000010070000002000001000400 +- PROVIDE (__etext = .); +- PROVIDE (_etext = .); +- PROVIDE (etext = .); +- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } +- .rodata1 : { *(.rodata1) } +- .sdata2 : { *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) } +- .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) } +- .opd : { *(.opd) } +- .IA_64.unwind_info : { *(.IA_64.unwind_info* .gnu.linkonce.ia64unwi.*) } +- .IA_64.unwind : { *(.IA_64.unwind* .gnu.linkonce.ia64unw.*) } +- .eh_frame_hdr : { *(.eh_frame_hdr) } +- /* Adjust the address for the data segment. We want to adjust up to +- the same address within the page on the next page up. */ +- . = ALIGN(0x10000) + (. & (0x10000 - 1)); +- /* Ensure the __preinit_array_start label is properly aligned. We +- could instead move the label definition inside the section, but +- the linker would then create the section even if it turns out to +- be empty, which isn't pretty. */ +- . = ALIGN(64 / 8); +- PROVIDE (__preinit_array_start = .); +- .preinit_array : { *(.preinit_array) } +- PROVIDE (__preinit_array_end = .); +- PROVIDE (__init_array_start = .); +- .init_array : { *(.init_array) } +- PROVIDE (__init_array_end = .); +- PROVIDE (__fini_array_start = .); +- .fini_array : { *(.fini_array) } +- PROVIDE (__fini_array_end = .); +- .data : +- { +- *(.data .data.* .gnu.linkonce.d.*) +- SORT(CONSTRUCTORS) +- } +- .data1 : { *(.data1) } +- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } +- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } +- .eh_frame : { KEEP (*(.eh_frame)) } +- .gcc_except_table : { *(.gcc_except_table) } +- .dynamic : { *(.dynamic) } +- .ctors : +- { +- /* gcc uses crtbegin.o to find the start of +- the constructors, so we make sure it is +- first. Because this is a wildcard, it +- doesn't matter if the user does not +- actually link against crtbegin.o; the +- linker won't look for a file to match a +- wildcard. The wildcard also means that it +- doesn't matter which directory crtbegin.o +- is in. */ +- KEEP (*crtbegin*.o(.ctors)) +- /* We don't want to include the .ctor section from +- from the crtend.o file until after the sorted ctors. +- The .ctor section from the crtend file contains the +- end of ctors marker and it must be last */ +- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors)) +- KEEP (*(SORT(.ctors.*))) +- KEEP (*(.ctors)) +- } +- .dtors : +- { +- KEEP (*crtbegin*.o(.dtors)) +- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors)) +- KEEP (*(SORT(.dtors.*))) +- KEEP (*(.dtors)) +- } +- .jcr : { KEEP (*(.jcr)) } +- /* Ensure __gp is outside the range of any normal data. We need to +- do this to avoid the linker optimizing the code in op.o and getting +- it out of sync with the relocs that we read when processing that +- file. A better solution might be to ensure that the dynamically +- generated code and static qemu code share a single gp-value. */ +- __gp = . + 0x200000; +- .got : { *(.got.plt) *(.got) } +- .IA_64.pltoff : { *(.IA_64.pltoff) } +- /* We want the small data sections together, so single-instruction offsets +- can access them all, and initialized data all before uninitialized, so +- we can shorten the on-disk segment size. */ +- .sdata : +- { +- *(.sdata .sdata.* .gnu.linkonce.s.*) +- } +- _edata = .; +- PROVIDE (edata = .); +- __bss_start = .; +- .sbss : +- { +- PROVIDE (__sbss_start = .); +- PROVIDE (___sbss_start = .); +- *(.dynsbss) +- *(.sbss .sbss.* .gnu.linkonce.sb.*) +- *(.scommon) +- PROVIDE (__sbss_end = .); +- PROVIDE (___sbss_end = .); +- } +- .bss : +- { +- . += 0x400000; /* ensure .bss stuff is out of reach of gp */ +- *(.dynbss) +- *(.bss .bss.* .gnu.linkonce.b.*) +- *(COMMON) +- /* Align here to ensure that the .bss section occupies space up to +- _end. Align after .bss to ensure correct alignment even if the +- .bss section disappears because there are no input sections. */ +- . = ALIGN(64 / 8); +- } +- . = ALIGN(64 / 8); +- _end = .; +- PROVIDE (end = .); +- /* Stabs debugging sections. */ +- .stab 0 : { *(.stab) } +- .stabstr 0 : { *(.stabstr) } +- .stab.excl 0 : { *(.stab.excl) } +- .stab.exclstr 0 : { *(.stab.exclstr) } +- .stab.index 0 : { *(.stab.index) } +- .stab.indexstr 0 : { *(.stab.indexstr) } +- .comment 0 : { *(.comment) } +- /* DWARF debug sections. +- Symbols in the DWARF debugging sections are relative to the beginning +- of the section so we begin them at 0. */ +- /* DWARF 1 */ +- .debug 0 : { *(.debug) } +- .line 0 : { *(.line) } +- /* GNU DWARF 1 extensions */ +- .debug_srcinfo 0 : { *(.debug_srcinfo) } +- .debug_sfnames 0 : { *(.debug_sfnames) } +- /* DWARF 1.1 and DWARF 2 */ +- .debug_aranges 0 : { *(.debug_aranges) } +- .debug_pubnames 0 : { *(.debug_pubnames) } +- /* DWARF 2 */ +- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } +- .debug_abbrev 0 : { *(.debug_abbrev) } +- .debug_line 0 : { *(.debug_line) } +- .debug_frame 0 : { *(.debug_frame) } +- .debug_str 0 : { *(.debug_str) } +- .debug_loc 0 : { *(.debug_loc) } +- .debug_macinfo 0 : { *(.debug_macinfo) } +- /* SGI/MIPS DWARF 2 extensions */ +- .debug_weaknames 0 : { *(.debug_weaknames) } +- .debug_funcnames 0 : { *(.debug_funcnames) } +- .debug_typenames 0 : { *(.debug_typenames) } +- .debug_varnames 0 : { *(.debug_varnames) } +- /DISCARD/ : { *(.note.GNU-stack) } +-} +diff --git a/ldscripts/m68k.ld b/ldscripts/m68k.ld +deleted file mode 100644 +index 0e3d9de..0000000 +--- a/ldscripts/m68k.ld ++++ /dev/null +@@ -1,175 +0,0 @@ +-/* Script for -z combreloc: combine and sort reloc sections */ +-OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", +- "elf32-m68k") +-OUTPUT_ARCH(m68k) +-ENTRY(_start) +-/* __DYNAMIC = 0; */ +-SECTIONS +-{ +- /* Read-only sections, merged into text segment: */ +- . = 0x60000000 + SIZEOF_HEADERS; +- .interp : { *(.interp) } +- .hash : { *(.hash) } +- .dynsym : { *(.dynsym) } +- .dynstr : { *(.dynstr) } +- .gnu.version : { *(.gnu.version) } +- .gnu.version_d : { *(.gnu.version_d) } +- .gnu.version_r : { *(.gnu.version_r) } +- .rel.dyn : +- { +- *(.rel.init) +- *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) +- *(.rel.fini) +- *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) +- *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) +- *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) +- *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) +- *(.rel.ctors) +- *(.rel.dtors) +- *(.rel.got) +- *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) +- } +- .rela.dyn : +- { +- *(.rela.init) +- *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) +- *(.rela.fini) +- *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) +- *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) +- *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) +- *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) +- *(.rela.ctors) +- *(.rela.dtors) +- *(.rela.got) +- *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) +- } +- .rel.plt : { *(.rel.plt) } +- .rela.plt : { *(.rela.plt) } +- .init : +- { +- KEEP (*(.init)) +- } =0x4e754e75 +- .plt : { *(.plt) } +- .text : +- { +- *(.text .stub .text.* .gnu.linkonce.t.*) +- /* .gnu.warning sections are handled specially by elf32.em. */ +- *(.gnu.warning) +- } =0x4e754e75 +- .fini : +- { +- KEEP (*(.fini)) +- } =0x4e754e75 +- PROVIDE (__etext = .); +- PROVIDE (_etext = .); +- PROVIDE (etext = .); +- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } +- .rodata1 : { *(.rodata1) } +- .eh_frame_hdr : { *(.eh_frame_hdr) } +- /* Adjust the address for the data segment. We want to adjust up to +- the same address within the page on the next page up. */ +- . = ALIGN(0x2000) + (. & (0x2000 - 1)); +- /* Ensure the __preinit_array_start label is properly aligned. We +- could instead move the label definition inside the section, but +- the linker would then create the section even if it turns out to +- be empty, which isn't pretty. */ +- . = ALIGN(32 / 8); +- PROVIDE (__preinit_array_start = .); +- .preinit_array : { *(.preinit_array) } +- PROVIDE (__preinit_array_end = .); +- PROVIDE (__init_array_start = .); +- .init_array : { *(.init_array) } +- PROVIDE (__init_array_end = .); +- PROVIDE (__fini_array_start = .); +- .fini_array : { *(.fini_array) } +- PROVIDE (__fini_array_end = .); +- .data : +- { +- *(.data .data.* .gnu.linkonce.d.*) +- SORT(CONSTRUCTORS) +- } +- .data1 : { *(.data1) } +- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } +- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } +- .eh_frame : { KEEP (*(.eh_frame)) } +- .gcc_except_table : { *(.gcc_except_table) } +- .dynamic : { *(.dynamic) } +- .ctors : +- { +- /* gcc uses crtbegin.o to find the start of +- the constructors, so we make sure it is +- first. Because this is a wildcard, it +- doesn't matter if the user does not +- actually link against crtbegin.o; the +- linker won't look for a file to match a +- wildcard. The wildcard also means that it +- doesn't matter which directory crtbegin.o +- is in. */ +- KEEP (*crtbegin.o(.ctors)) +- /* We don't want to include the .ctor section from +- from the crtend.o file until after the sorted ctors. +- The .ctor section from the crtend file contains the +- end of ctors marker and it must be last */ +- KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors)) +- KEEP (*(SORT(.ctors.*))) +- KEEP (*(.ctors)) +- } +- .dtors : +- { +- KEEP (*crtbegin.o(.dtors)) +- KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors)) +- KEEP (*(SORT(.dtors.*))) +- KEEP (*(.dtors)) +- } +- .jcr : { KEEP (*(.jcr)) } +- .got : { *(.got.plt) *(.got) } +- _edata = .; +- PROVIDE (edata = .); +- __bss_start = .; +- .bss : +- { +- *(.dynbss) +- *(.bss .bss.* .gnu.linkonce.b.*) +- *(COMMON) +- /* Align here to ensure that the .bss section occupies space up to +- _end. Align after .bss to ensure correct alignment even if the +- .bss section disappears because there are no input sections. */ +- . = ALIGN(32 / 8); +- } +- . = ALIGN(32 / 8); +- _end = .; +- PROVIDE (end = .); +- /* Stabs debugging sections. */ +- .stab 0 : { *(.stab) } +- .stabstr 0 : { *(.stabstr) } +- .stab.excl 0 : { *(.stab.excl) } +- .stab.exclstr 0 : { *(.stab.exclstr) } +- .stab.index 0 : { *(.stab.index) } +- .stab.indexstr 0 : { *(.stab.indexstr) } +- .comment 0 : { *(.comment) } +- /* DWARF debug sections. +- Symbols in the DWARF debugging sections are relative to the beginning +- of the section so we begin them at 0. */ +- /* DWARF 1 */ +- .debug 0 : { *(.debug) } +- .line 0 : { *(.line) } +- /* GNU DWARF 1 extensions */ +- .debug_srcinfo 0 : { *(.debug_srcinfo) } +- .debug_sfnames 0 : { *(.debug_sfnames) } +- /* DWARF 1.1 and DWARF 2 */ +- .debug_aranges 0 : { *(.debug_aranges) } +- .debug_pubnames 0 : { *(.debug_pubnames) } +- /* DWARF 2 */ +- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } +- .debug_abbrev 0 : { *(.debug_abbrev) } +- .debug_line 0 : { *(.debug_line) } +- .debug_frame 0 : { *(.debug_frame) } +- .debug_str 0 : { *(.debug_str) } +- .debug_loc 0 : { *(.debug_loc) } +- .debug_macinfo 0 : { *(.debug_macinfo) } +- /* SGI/MIPS DWARF 2 extensions */ +- .debug_weaknames 0 : { *(.debug_weaknames) } +- .debug_funcnames 0 : { *(.debug_funcnames) } +- .debug_typenames 0 : { *(.debug_typenames) } +- .debug_varnames 0 : { *(.debug_varnames) } +-} +diff --git a/ldscripts/mips.ld b/ldscripts/mips.ld +deleted file mode 100644 +index 7b610ce..0000000 +--- a/ldscripts/mips.ld ++++ /dev/null +@@ -1,222 +0,0 @@ +-/* Default linker script, for normal executables */ +-OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", +- "elf32-tradlittlemips") +-OUTPUT_ARCH(mips) +-ENTRY(__start) +-SECTIONS +-{ +- /* Read-only sections, merged into text segment: */ +- PROVIDE (__executable_start = 0x0400000); . = 0x0400000 + SIZEOF_HEADERS; +- .interp : { *(.interp) } +- .reginfo : { *(.reginfo) } +- .dynamic : { *(.dynamic) } +- .hash : { *(.hash) } +- .dynsym : { *(.dynsym) } +- .dynstr : { *(.dynstr) } +- .gnu.version : { *(.gnu.version) } +- .gnu.version_d : { *(.gnu.version_d) } +- .gnu.version_r : { *(.gnu.version_r) } +- .rel.init : { *(.rel.init) } +- .rela.init : { *(.rela.init) } +- .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } +- .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } +- .rel.fini : { *(.rel.fini) } +- .rela.fini : { *(.rela.fini) } +- .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } +- .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } +- .rel.data.rel.ro : { *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) } +- .rela.data.rel.ro : { *(.rela.data.rel.ro* .rela.gnu.linkonce.d.rel.ro.*) } +- .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } +- .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } +- .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } +- .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } +- .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } +- .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } +- .rel.ctors : { *(.rel.ctors) } +- .rela.ctors : { *(.rela.ctors) } +- .rel.dtors : { *(.rel.dtors) } +- .rela.dtors : { *(.rela.dtors) } +- .rel.got : { *(.rel.got) } +- .rela.got : { *(.rela.got) } +- .rel.sdata : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) } +- .rela.sdata : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) } +- .rel.sbss : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) } +- .rela.sbss : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) } +- .rel.sdata2 : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) } +- .rela.sdata2 : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) } +- .rel.sbss2 : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) } +- .rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) } +- .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } +- .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } +- .rel.plt : { *(.rel.plt) } +- .rela.plt : { *(.rela.plt) } +- .init : +- { +- KEEP (*(.init)) +- } =0x47ff041f +- .plt : { *(.plt) } +- .text : +- { +- _ftext = . ; +- *(.text .stub .text.* .gnu.linkonce.t.*) +- KEEP (*(.text.*personality*)) +- /* .gnu.warning sections are handled specially by elf32.em. */ +- *(.gnu.warning) +- *(.mips16.fn.*) *(.mips16.call.*) +- } =0x47ff041f +- .fini : +- { +- KEEP (*(.fini)) +- } =0x47ff041f +- PROVIDE (__etext = .); +- PROVIDE (_etext = .); +- PROVIDE (etext = .); +- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } +- .rodata1 : { *(.rodata1) } +- .sdata2 : +- { +- *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) +- } +- .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) } +- .eh_frame_hdr : { *(.eh_frame_hdr) } +- /* Adjust the address for the data segment. We want to adjust up to +- the same address within the page on the next page up. */ +- . = ALIGN (0x40000) - ((0x40000 - .) & (0x40000 - 1)); . = DATA_SEGMENT_ALIGN (0x40000, 0x1000); +- /* Exception handling */ +- .eh_frame : { KEEP (*(.eh_frame)) } +- .gcc_except_table : { *(.gcc_except_table .gcc_except_table.*) } +- /* Thread Local Storage sections */ +- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } +- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } +- .preinit_array : +- { +- PROVIDE (__preinit_array_start = .); +- KEEP (*(.preinit_array)) +- PROVIDE (__preinit_array_end = .); +- } +- .init_array : +- { +- PROVIDE (__init_array_start = .); +- KEEP (*(SORT(.init_array.*))) +- KEEP (*(.init_array)) +- PROVIDE (__init_array_end = .); +- } +- .fini_array : +- { +- PROVIDE (__fini_array_start = .); +- KEEP (*(.fini_array)) +- KEEP (*(SORT(.fini_array.*))) +- PROVIDE (__fini_array_end = .); +- } +- .ctors : +- { +- /* gcc uses crtbegin.o to find the start of +- the constructors, so we make sure it is +- first. Because this is a wildcard, it +- doesn't matter if the user does not +- actually link against crtbegin.o; the +- linker won't look for a file to match a +- wildcard. The wildcard also means that it +- doesn't matter which directory crtbegin.o +- is in. */ +- KEEP (*crtbegin*.o(.ctors)) +- /* We don't want to include the .ctor section from +- the crtend.o file until after the sorted ctors. +- The .ctor section from the crtend file contains the +- end of ctors marker and it must be last */ +- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors)) +- KEEP (*(SORT(.ctors.*))) +- KEEP (*(.ctors)) +- } +- .dtors : +- { +- KEEP (*crtbegin*.o(.dtors)) +- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors)) +- KEEP (*(SORT(.dtors.*))) +- KEEP (*(.dtors)) +- } +- .jcr : { KEEP (*(.jcr)) } +- .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) } +- . = DATA_SEGMENT_RELRO_END (0, .); +- .data : +- { +- _fdata = . ; +- *(.data .data.* .gnu.linkonce.d.*) +- KEEP (*(.gnu.linkonce.d.*personality*)) +- SORT(CONSTRUCTORS) +- } +- .data1 : { *(.data1) } +- . = .; +- _gp = ALIGN(16) + 0x7ff0; +- .got : { *(.got.plt) *(.got) } +- /* We want the small data sections together, so single-instruction offsets +- can access them all, and initialized data all before uninitialized, so +- we can shorten the on-disk segment size. */ +- .sdata : +- { +- *(.sdata .sdata.* .gnu.linkonce.s.*) +- } +- .lit8 : { *(.lit8) } +- .lit4 : { *(.lit4) } +- _edata = .; PROVIDE (edata = .); +- __bss_start = .; +- _fbss = .; +- .sbss : +- { +- *(.dynsbss) +- *(.sbss .sbss.* .gnu.linkonce.sb.*) +- *(.scommon) +- } +- .bss : +- { +- *(.dynbss) +- *(.bss .bss.* .gnu.linkonce.b.*) +- *(COMMON) +- /* Align here to ensure that the .bss section occupies space up to +- _end. Align after .bss to ensure correct alignment even if the +- .bss section disappears because there are no input sections. +- FIXME: Why do we need it? When there is no .bss section, we don't +- pad the .data section. */ +- . = ALIGN(. != 0 ? 32 / 8 : 1); +- } +- . = ALIGN(32 / 8); +- . = ALIGN(32 / 8); +- _end = .; PROVIDE (end = .); +- . = DATA_SEGMENT_END (.); +- /* Stabs debugging sections. */ +- .stab 0 : { *(.stab) } +- .stabstr 0 : { *(.stabstr) } +- .stab.excl 0 : { *(.stab.excl) } +- .stab.exclstr 0 : { *(.stab.exclstr) } +- .stab.index 0 : { *(.stab.index) } +- .stab.indexstr 0 : { *(.stab.indexstr) } +- .comment 0 : { *(.comment) } +- /* DWARF debug sections. +- Symbols in the DWARF debugging sections are relative to the beginning +- of the section so we begin them at 0. */ +- /* DWARF 1 */ +- .debug 0 : { *(.debug) } +- .line 0 : { *(.line) } +- /* GNU DWARF 1 extensions */ +- .debug_srcinfo 0 : { *(.debug_srcinfo) } +- .debug_sfnames 0 : { *(.debug_sfnames) } +- /* DWARF 1.1 and DWARF 2 */ +- .debug_aranges 0 : { *(.debug_aranges) } +- .debug_pubnames 0 : { *(.debug_pubnames) } +- /* DWARF 2 */ +- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } +- .debug_abbrev 0 : { *(.debug_abbrev) } +- .debug_line 0 : { *(.debug_line) } +- .debug_frame 0 : { *(.debug_frame) } +- .debug_str 0 : { *(.debug_str) } +- .debug_loc 0 : { *(.debug_loc) } +- .debug_macinfo 0 : { *(.debug_macinfo) } +- /* SGI/MIPS DWARF 2 extensions */ +- .debug_weaknames 0 : { *(.debug_weaknames) } +- .debug_funcnames 0 : { *(.debug_funcnames) } +- .debug_typenames 0 : { *(.debug_typenames) } +- .debug_varnames 0 : { *(.debug_varnames) } +- .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } +- .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } +- /DISCARD/ : { *(.note.GNU-stack) } +-} +diff --git a/ldscripts/ppc.ld b/ldscripts/ppc.ld +deleted file mode 100644 +index 2a0dcad..0000000 +--- a/ldscripts/ppc.ld ++++ /dev/null +@@ -1,237 +0,0 @@ +-/* ld script to make i386 Linux kernel +- * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>; +- */ +-OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc") +-OUTPUT_ARCH(powerpc:common) +-ENTRY(_start) +-SECTIONS +-{ +- /* Read-only sections, merged into text segment: */ +- . = 0x60000000 + SIZEOF_HEADERS; +- .interp : { *(.interp) } +- .hash : { *(.hash) } +- .dynsym : { *(.dynsym) } +- .dynstr : { *(.dynstr) } +- .gnu.version : { *(.gnu.version) } +- .gnu.version_d : { *(.gnu.version_d) } +- .gnu.version_r : { *(.gnu.version_r) } +- .rel.init : { *(.rel.init) } +- .rela.init : { *(.rela.init) } +- .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } +- .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } +- .rel.fini : { *(.rel.fini) } +- .rela.fini : { *(.rela.fini) } +- .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } +- .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } +- .rel.data.rel.ro : { *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) } +- .rela.data.rel.ro : { *(.rela.data.rel.ro* .rela.gnu.linkonce.d.rel.ro.*) } +- .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } +- .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } +- .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } +- .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } +- .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } +- .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } +- .rel.ctors : { *(.rel.ctors) } +- .rela.ctors : { *(.rela.ctors) } +- .rel.dtors : { *(.rel.dtors) } +- .rela.dtors : { *(.rela.dtors) } +- .rel.got : { *(.rel.got) } +- .rela.got : { *(.rela.got) } +- .rela.got1 : { *(.rela.got1) } +- .rela.got2 : { *(.rela.got2) } +- .rel.sdata : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) } +- .rela.sdata : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) } +- .rel.sbss : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) } +- .rela.sbss : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) } +- .rel.sdata2 : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) } +- .rela.sdata2 : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) } +- .rel.sbss2 : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) } +- .rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) } +- .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } +- .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } +- .rel.plt : +- { +- *(.rel.plt) +- PROVIDE (__rel_iplt_start = .); +- *(.rel.iplt) +- PROVIDE (__rel_iplt_end = .); +- } +- .rela.plt : +- { +- *(.rela.plt) +- PROVIDE (__rela_iplt_start = .); +- *(.rela.iplt) +- PROVIDE (__rela_iplt_end = .); +- } +- .init : +- { +- KEEP (*(.init)) +- } =0 +- .text : +- { +- *(.text .stub .text.* .gnu.linkonce.t.*) +- KEEP (*(.text.*personality*)) +- /* .gnu.warning sections are handled specially by elf32.em. */ +- *(.gnu.warning) +- *(.glink) +- } =0x47ff041f +- .fini : +- { +- KEEP (*(.fini)) +- } =0x47ff041f +- PROVIDE (__etext = .); +- PROVIDE (_etext = .); +- PROVIDE (etext = .); +- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } +- .rodata1 : { *(.rodata1) } +- .sdata2 : +- { +- PROVIDE (_SDA2_BASE_ = 32768); +- *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) +- } +- .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) } +- .eh_frame_hdr : { *(.eh_frame_hdr) } +- /* Adjust the address for the data segment. We want to adjust up to +- the same address within the page on the next page up. */ +- . = ALIGN (0x10000) - ((0x10000 - .) & (0x10000 - 1)); . = DATA_SEGMENT_ALIGN (0x10000, 0x1000); +- /* Exception handling */ +- .eh_frame : { KEEP (*(.eh_frame)) } +- .gcc_except_table : { *(.gcc_except_table .gcc_except_table.*) } +- /* Thread Local Storage sections */ +- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } +- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } +- .preinit_array : +- { +- PROVIDE (__preinit_array_start = .); +- KEEP (*(.preinit_array)) +- PROVIDE (__preinit_array_end = .); +- } +- .init_array : +- { +- PROVIDE (__init_array_start = .); +- KEEP (*(SORT(.init_array.*))) +- KEEP (*(.init_array)) +- PROVIDE (__init_array_end = .); +- } +- .fini_array : +- { +- PROVIDE (__fini_array_start = .); +- KEEP (*(.fini_array)) +- KEEP (*(SORT(.fini_array.*))) +- PROVIDE (__fini_array_end = .); +- } +- .ctors : +- { +- /* gcc uses crtbegin.o to find the start of +- the constructors, so we make sure it is +- first. Because this is a wildcard, it +- doesn't matter if the user does not +- actually link against crtbegin.o; the +- linker won't look for a file to match a +- wildcard. The wildcard also means that it +- doesn't matter which directory crtbegin.o +- is in. */ +- KEEP (*crtbegin*.o(.ctors)) +- /* We don't want to include the .ctor section from +- the crtend.o file until after the sorted ctors. +- The .ctor section from the crtend file contains the +- end of ctors marker and it must be last */ +- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors)) +- KEEP (*(SORT(.ctors.*))) +- KEEP (*(.ctors)) +- } +- .dtors : +- { +- KEEP (*crtbegin*.o(.dtors)) +- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors)) +- KEEP (*(SORT(.dtors.*))) +- KEEP (*(.dtors)) +- } +- .jcr : { KEEP (*(.jcr)) } +- .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) } +- .got1 : { *(.got1) } +- .got2 : { *(.got2) } +- .dynamic : { *(.dynamic) } +- .got : SPECIAL { *(.got) } +- . = DATA_SEGMENT_RELRO_END (0, .); +- .plt : SPECIAL { *(.plt) } +- .data : +- { +- *(.data .data.* .gnu.linkonce.d.*) +- KEEP (*(.gnu.linkonce.d.*personality*)) +- SORT(CONSTRUCTORS) +- } +- .data1 : { *(.data1) } +- .got : SPECIAL { *(.got) } +- /* We want the small data sections together, so single-instruction offsets +- can access them all, and initialized data all before uninitialized, so +- we can shorten the on-disk segment size. */ +- .sdata : +- { +- PROVIDE (_SDA_BASE_ = 32768); +- *(.sdata .sdata.* .gnu.linkonce.s.*) +- } +- _edata = .; PROVIDE (edata = .); +- __bss_start = .; +- .sbss : +- { +- PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .); +- *(.dynsbss) +- *(.sbss .sbss.* .gnu.linkonce.sb.*) +- *(.scommon) +- PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .); +- } +- .plt : SPECIAL { *(.plt) } +- .bss : +- { +- *(.dynbss) +- *(.bss .bss.* .gnu.linkonce.b.*) +- *(COMMON) +- /* Align here to ensure that the .bss section occupies space up to +- _end. Align after .bss to ensure correct alignment even if the +- .bss section disappears because there are no input sections. +- FIXME: Why do we need it? When there is no .bss section, we don't +- pad the .data section. */ +- . = ALIGN(. != 0 ? 32 / 8 : 1); +- } +- . = ALIGN(32 / 8); +- . = ALIGN(32 / 8); +- _end = .; PROVIDE (end = .); +- . = DATA_SEGMENT_END (.); +- /* Stabs debugging sections. */ +- .stab 0 : { *(.stab) } +- .stabstr 0 : { *(.stabstr) } +- .stab.excl 0 : { *(.stab.excl) } +- .stab.exclstr 0 : { *(.stab.exclstr) } +- .stab.index 0 : { *(.stab.index) } +- .stab.indexstr 0 : { *(.stab.indexstr) } +- .comment 0 : { *(.comment) } +- /* DWARF debug sections. +- Symbols in the DWARF debugging sections are relative to the beginning +- of the section so we begin them at 0. */ +- /* DWARF 1 */ +- .debug 0 : { *(.debug) } +- .line 0 : { *(.line) } +- /* GNU DWARF 1 extensions */ +- .debug_srcinfo 0 : { *(.debug_srcinfo) } +- .debug_sfnames 0 : { *(.debug_sfnames) } +- /* DWARF 1.1 and DWARF 2 */ +- .debug_aranges 0 : { *(.debug_aranges) } +- .debug_pubnames 0 : { *(.debug_pubnames) } +- /* DWARF 2 */ +- .debug_info 0 : { *(.debug_info) } +- .debug_abbrev 0 : { *(.debug_abbrev) } +- .debug_line 0 : { *(.debug_line) } +- .debug_frame 0 : { *(.debug_frame) } +- .debug_str 0 : { *(.debug_str) } +- .debug_loc 0 : { *(.debug_loc) } +- .debug_macinfo 0 : { *(.debug_macinfo) } +- /* SGI/MIPS DWARF 2 extensions */ +- .debug_weaknames 0 : { *(.debug_weaknames) } +- .debug_funcnames 0 : { *(.debug_funcnames) } +- .debug_typenames 0 : { *(.debug_typenames) } +- .debug_varnames 0 : { *(.debug_varnames) } +- /* These must appear regardless of . */ +- /DISCARD/ : { *(.fixup) } +- /DISCARD/ : { *(.note.GNU-stack) } +-} +diff --git a/ldscripts/ppc64.ld b/ldscripts/ppc64.ld +deleted file mode 100644 +index e2dafa0..0000000 +--- a/ldscripts/ppc64.ld ++++ /dev/null +@@ -1,230 +0,0 @@ +-/* Script for -z combreloc: combine and sort reloc sections */ +-OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc", +- "elf64-powerpc") +-OUTPUT_ARCH(powerpc:common64) +-ENTRY(_start) +-/* __DYNAMIC = 0; */ +-SECTIONS +-{ +- /* Read-only sections, merged into text segment: */ +- PROVIDE (__executable_start = 0x60000000); . = 0x60000000 + SIZEOF_HEADERS; +- .interp : { *(.interp) } +- .hash : { *(.hash) } +- .dynsym : { *(.dynsym) } +- .dynstr : { *(.dynstr) } +- .gnu.version : { *(.gnu.version) } +- .gnu.version_d : { *(.gnu.version_d) } +- .gnu.version_r : { *(.gnu.version_r) } +- .rel.dyn : +- { +- *(.rel.init) +- *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) +- *(.rel.fini) +- *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) +- *(.rel.data.rel.ro*) +- *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) +- *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) +- *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) +- *(.rel.ctors) +- *(.rel.dtors) +- *(.rel.got) +- *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) +- *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) +- *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) +- *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) +- *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) +- } +- .rela.dyn : +- { +- *(.rela.init) +- *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) +- *(.rela.fini) +- *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) +- *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) +- *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) +- *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) +- *(.rela.ctors) +- *(.rela.dtors) +- *(.rela.got) +- *(.rela.toc) +- *(.rela.opd) +- *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) +- *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) +- *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) +- *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) +- *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) +- } +- .rel.plt : +- { +- *(.rel.plt) +- PROVIDE (__rel_iplt_start = .); +- *(.rel.iplt) +- PROVIDE (__rel_iplt_end = .); +- } +- .rela.plt : +- { +- *(.rela.plt) +- PROVIDE (__rela_iplt_start = .); +- *(.rela.iplt) +- PROVIDE (__rela_iplt_end = .); +- } +- .rela.tocbss : { *(.rela.tocbss) } +- .init : +- { +- KEEP (*(.init)) +- } =0x60000000 +- .text : +- { +- *(.text .stub .text.* .gnu.linkonce.t.*) +- KEEP (*(.text.*personality*)) +- /* .gnu.warning sections are handled specially by elf32.em. */ +- *(.gnu.warning) +- *(.sfpr .glink) +- } =0x60000000 +- .fini : +- { +- KEEP (*(.fini)) +- } =0x60000000 +- PROVIDE (__etext = .); +- PROVIDE (_etext = .); +- PROVIDE (etext = .); +- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } +- .rodata1 : { *(.rodata1) } +- .sdata2 : { *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) } +- .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) } +- .eh_frame_hdr : { *(.eh_frame_hdr) } +- /* Adjust the address for the data segment. We want to adjust up to +- the same address within the page on the next page up. */ +- . = ALIGN (0x10000) - ((0x10000 - .) & (0x10000 - 1)); . = DATA_SEGMENT_ALIGN +-(0x10000, 0x1000); /* Exception handling */ +- .eh_frame : { KEEP (*(.eh_frame)) } +- .gcc_except_table : { KEEP (*(.gcc_except_table)) +-*(.gcc_except_table.*) } /* Thread Local Storage sections */ +- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } +- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } +- /* Ensure the __preinit_array_start label is properly aligned. We +- could instead move the label definition inside the section, but +- the linker would then create the section even if it turns out to +- be empty, which isn't pretty. */ +- . = ALIGN(64 / 8); +- PROVIDE (__preinit_array_start = .); +- .preinit_array : { KEEP (*(.preinit_array)) } +- PROVIDE (__preinit_array_end = .); +- PROVIDE (__init_array_start = .); +- .init_array : { KEEP (*(.init_array)) } +- PROVIDE (__init_array_end = .); +- PROVIDE (__fini_array_start = .); +- .fini_array : { KEEP (*(.fini_array)) } +- PROVIDE (__fini_array_end = .); +- .ctors : +- { +- /* gcc uses crtbegin.o to find the start of +- the constructors, so we make sure it is +- first. Because this is a wildcard, it +- doesn't matter if the user does not +- actually link against crtbegin.o; the +- linker won't look for a file to match a +- wildcard. The wildcard also means that it +- doesn't matter which directory crtbegin.o +- is in. */ +- KEEP (*crtbegin*.o(.ctors)) +- /* We don't want to include the .ctor section from +- from the crtend.o file until after the sorted ctors. +- The .ctor section from the crtend file contains the +- end of ctors marker and it must be last */ +- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors)) +- KEEP (*(SORT(.ctors.*))) +- KEEP (*(.ctors)) +- } +- .dtors : +- { +- KEEP (*crtbegin*.o(.dtors)) +- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors)) +- KEEP (*(SORT(.dtors.*))) +- KEEP (*(.dtors)) +- } +- .jcr : { KEEP (*(.jcr)) } +- .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) } +- .dynamic : { *(.dynamic) } +- . = DATA_SEGMENT_RELRO_END (0, .); +- .data : +- { +- *(.data .data.* .gnu.linkonce.d.*) +- KEEP (*(.gnu.linkonce.d.*personality*)) +- SORT(CONSTRUCTORS) +- } +- .data1 : { *(.data1) } +- .toc1 ALIGN(8) : { *(.toc1) } +- .opd ALIGN(8) : { KEEP (*(.opd)) } +- .got ALIGN(8) : { *(.got .toc) } +- /* We want the small data sections together, so single-instruction offsets +- can access them all, and initialized data all before uninitialized, so +- we can shorten the on-disk segment size. */ +- .sdata : +- { +- *(.sdata .sdata.* .gnu.linkonce.s.*) +- } +- _edata = .; +- PROVIDE (edata = .); +- __bss_start = .; +- .tocbss ALIGN(8) : { *(.tocbss)} +- .sbss : +- { +- PROVIDE (__sbss_start = .); +- PROVIDE (___sbss_start = .); +- *(.dynsbss) +- *(.sbss .sbss.* .gnu.linkonce.sb.*) +- *(.scommon) +- PROVIDE (__sbss_end = .); +- PROVIDE (___sbss_end = .); +- } +- .plt : { *(.plt) } +- .bss : +- { +- *(.dynbss) +- *(.bss .bss.* .gnu.linkonce.b.*) +- *(COMMON) +- /* Align here to ensure that the .bss section occupies space up to +- _end. Align after .bss to ensure correct alignment even if the +- .bss section disappears because there are no input sections. */ +- . = ALIGN(64 / 8); +- } +- . = ALIGN(64 / 8); +- _end = .; +- PROVIDE (end = .); +- . = DATA_SEGMENT_END (.); +- /* Stabs debugging sections. */ +- .stab 0 : { *(.stab) } +- .stabstr 0 : { *(.stabstr) } +- .stab.excl 0 : { *(.stab.excl) } +- .stab.exclstr 0 : { *(.stab.exclstr) } +- .stab.index 0 : { *(.stab.index) } +- .stab.indexstr 0 : { *(.stab.indexstr) } +- .comment 0 : { *(.comment) } +- /* DWARF debug sections. +- Symbols in the DWARF debugging sections are relative to the beginning +- of the section so we begin them at 0. */ +- /* DWARF 1 */ +- .debug 0 : { *(.debug) } +- .line 0 : { *(.line) } +- /* GNU DWARF 1 extensions */ +- .debug_srcinfo 0 : { *(.debug_srcinfo) } +- .debug_sfnames 0 : { *(.debug_sfnames) } +- /* DWARF 1.1 and DWARF 2 */ +- .debug_aranges 0 : { *(.debug_aranges) } +- .debug_pubnames 0 : { *(.debug_pubnames) } +- /* DWARF 2 */ +- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } +- .debug_abbrev 0 : { *(.debug_abbrev) } +- .debug_line 0 : { *(.debug_line) } +- .debug_frame 0 : { *(.debug_frame) } +- .debug_str 0 : { *(.debug_str) } +- .debug_loc 0 : { *(.debug_loc) } +- .debug_macinfo 0 : { *(.debug_macinfo) } +- /* SGI/MIPS DWARF 2 extensions */ +- .debug_weaknames 0 : { *(.debug_weaknames) } +- .debug_funcnames 0 : { *(.debug_funcnames) } +- .debug_typenames 0 : { *(.debug_typenames) } +- .debug_varnames 0 : { *(.debug_varnames) } +- /DISCARD/ : { *(.note.GNU-stack) } +-} +diff --git a/ldscripts/s390.ld b/ldscripts/s390.ld +deleted file mode 100644 +index a9c5370..0000000 +--- a/ldscripts/s390.ld ++++ /dev/null +@@ -1,201 +0,0 @@ +-OUTPUT_FORMAT("elf32-s390", "elf32-s390", +- "elf32-s390") +-OUTPUT_ARCH(s390:31-bit) +-ENTRY(_start) +-/* __DYNAMIC = 0; */ +-SECTIONS +-{ +- /* Read-only sections, merged into text segment: */ +- . = 0x60000000 + SIZEOF_HEADERS; +- .interp : { *(.interp) } +- .hash : { *(.hash) } +- .dynsym : { *(.dynsym) } +- .dynstr : { *(.dynstr) } +- .gnu.version : { *(.gnu.version) } +- .gnu.version_d : { *(.gnu.version_d) } +- .gnu.version_r : { *(.gnu.version_r) } +- .rel.dyn : +- { +- *(.rel.init) +- *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) +- *(.rel.fini) +- *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) +- *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) +- *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) +- *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) +- *(.rel.ctors) +- *(.rel.dtors) +- *(.rel.got) +- *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) +- *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) +- *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) +- *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) +- *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) +- } +- .rela.dyn : +- { +- *(.rela.init) +- *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) +- *(.rela.fini) +- *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) +- *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) +- *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) +- *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) +- *(.rela.ctors) +- *(.rela.dtors) +- *(.rela.got) +- *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) +- *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) +- *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) +- *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) +- *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) +- } +- .rel.plt : { *(.rel.plt) } +- .rela.plt : { *(.rela.plt) } +- .init : +- { +- KEEP (*(.init)) +- } =0x07070707 +- .plt : { *(.plt) } +- .text : +- { +- *(.text .stub .text.* .gnu.linkonce.t.*) +- /* .gnu.warning sections are handled specially by elf32.em. */ +- *(.gnu.warning) +- } =0x07070707 +- .fini : +- { +- KEEP (*(.fini)) +- } =0x07070707 +- PROVIDE (__etext = .); +- PROVIDE (_etext = .); +- PROVIDE (etext = .); +- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } +- .rodata1 : { *(.rodata1) } +- .sdata2 : { *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) } +- .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) } +- .eh_frame_hdr : { *(.eh_frame_hdr) } +- /* Adjust the address for the data segment. We want to adjust up to +- the same address within the page on the next page up. */ +- . = ALIGN(0x1000) + (. & (0x1000 - 1)); +- /* Ensure the __preinit_array_start label is properly aligned. We +- could instead move the label definition inside the section, but +- the linker would then create the section even if it turns out to +- be empty, which isn't pretty. */ +- . = ALIGN(32 / 8); +- PROVIDE (__preinit_array_start = .); +- .preinit_array : { *(.preinit_array) } +- PROVIDE (__preinit_array_end = .); +- PROVIDE (__init_array_start = .); +- .init_array : { *(.init_array) } +- PROVIDE (__init_array_end = .); +- PROVIDE (__fini_array_start = .); +- .fini_array : { *(.fini_array) } +- PROVIDE (__fini_array_end = .); +- .data : +- { +- *(.data .data.* .gnu.linkonce.d.*) +- SORT(CONSTRUCTORS) +- } +- .data1 : { *(.data1) } +- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } +- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } +- .eh_frame : { KEEP (*(.eh_frame)) } +- .gcc_except_table : { *(.gcc_except_table) } +- .dynamic : { *(.dynamic) } +- .ctors : +- { +- /* gcc uses crtbegin.o to find the start of +- the constructors, so we make sure it is +- first. Because this is a wildcard, it +- doesn't matter if the user does not +- actually link against crtbegin.o; the +- linker won't look for a file to match a +- wildcard. The wildcard also means that it +- doesn't matter which directory crtbegin.o +- is in. */ +- KEEP (*crtbegin.o(.ctors)) +- /* We don't want to include the .ctor section from +- from the crtend.o file until after the sorted ctors. +- The .ctor section from the crtend file contains the +- end of ctors marker and it must be last */ +- KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors)) +- KEEP (*(SORT(.ctors.*))) +- KEEP (*(.ctors)) +- } +- .dtors : +- { +- KEEP (*crtbegin.o(.dtors)) +- KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors)) +- KEEP (*(SORT(.dtors.*))) +- KEEP (*(.dtors)) +- } +- .jcr : { KEEP (*(.jcr)) } +- .got : { *(.got.plt) *(.got) } +- /* We want the small data sections together, so single-instruction offsets +- can access them all, and initialized data all before uninitialized, so +- we can shorten the on-disk segment size. */ +- .sdata : +- { +- *(.sdata .sdata.* .gnu.linkonce.s.*) +- } +- _edata = .; +- PROVIDE (edata = .); +- __bss_start = .; +- .sbss : +- { +- PROVIDE (__sbss_start = .); +- PROVIDE (___sbss_start = .); +- *(.dynsbss) +- *(.sbss .sbss.* .gnu.linkonce.sb.*) +- *(.scommon) +- PROVIDE (__sbss_end = .); +- PROVIDE (___sbss_end = .); +- } +- .bss : +- { +- *(.dynbss) +- *(.bss .bss.* .gnu.linkonce.b.*) +- *(COMMON) +- /* Align here to ensure that the .bss section occupies space up to +- _end. Align after .bss to ensure correct alignment even if the +- .bss section disappears because there are no input sections. */ +- . = ALIGN(32 / 8); +- } +- . = ALIGN(32 / 8); +- _end = .; +- PROVIDE (end = .); +- /* Stabs debugging sections. */ +- .stab 0 : { *(.stab) } +- .stabstr 0 : { *(.stabstr) } +- .stab.excl 0 : { *(.stab.excl) } +- .stab.exclstr 0 : { *(.stab.exclstr) } +- .stab.index 0 : { *(.stab.index) } +- .stab.indexstr 0 : { *(.stab.indexstr) } +- .comment 0 : { *(.comment) } +- /* DWARF debug sections. +- Symbols in the DWARF debugging sections are relative to the beginning +- of the section so we begin them at 0. */ +- /* DWARF 1 */ +- .debug 0 : { *(.debug) } +- .line 0 : { *(.line) } +- /* GNU DWARF 1 extensions */ +- .debug_srcinfo 0 : { *(.debug_srcinfo) } +- .debug_sfnames 0 : { *(.debug_sfnames) } +- /* DWARF 1.1 and DWARF 2 */ +- .debug_aranges 0 : { *(.debug_aranges) } +- .debug_pubnames 0 : { *(.debug_pubnames) } +- /* DWARF 2 */ +- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } +- .debug_abbrev 0 : { *(.debug_abbrev) } +- .debug_line 0 : { *(.debug_line) } +- .debug_frame 0 : { *(.debug_frame) } +- .debug_str 0 : { *(.debug_str) } +- .debug_loc 0 : { *(.debug_loc) } +- .debug_macinfo 0 : { *(.debug_macinfo) } +- /* SGI/MIPS DWARF 2 extensions */ +- .debug_weaknames 0 : { *(.debug_weaknames) } +- .debug_funcnames 0 : { *(.debug_funcnames) } +- .debug_typenames 0 : { *(.debug_typenames) } +- .debug_varnames 0 : { *(.debug_varnames) } +-} +diff --git a/ldscripts/sparc.ld b/ldscripts/sparc.ld +deleted file mode 100644 +index 56efe34..0000000 +--- a/ldscripts/sparc.ld ++++ /dev/null +@@ -1,150 +0,0 @@ +-OUTPUT_FORMAT("elf32-sparc", "elf32-sparc", +- "elf32-sparc") +-OUTPUT_ARCH(sparc) +-ENTRY(_start) +-SECTIONS +-{ +- /* Read-only sections, merged into text segment: */ +- . = 0x60000000 + SIZEOF_HEADERS; +- .interp : { *(.interp) } +- .hash : { *(.hash) } +- .dynsym : { *(.dynsym) } +- .dynstr : { *(.dynstr) } +- .gnu.version : { *(.gnu.version) } +- .gnu.version_d : { *(.gnu.version_d) } +- .gnu.version_r : { *(.gnu.version_r) } +- .rel.text : +- { *(.rel.text) *(.rel.gnu.linkonce.t*) } +- .rela.text : +- { *(.rela.text) *(.rela.gnu.linkonce.t*) } +- .rel.data : +- { *(.rel.data) *(.rel.gnu.linkonce.d*) } +- .rela.data : +- { *(.rela.data) *(.rela.gnu.linkonce.d*) } +- .rel.rodata : +- { *(.rel.rodata) *(.rel.gnu.linkonce.r*) } +- .rela.rodata : +- { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } +- .rel.got : { *(.rel.got) } +- .rela.got : { *(.rela.got) } +- .rel.ctors : { *(.rel.ctors) } +- .rela.ctors : { *(.rela.ctors) } +- .rel.dtors : { *(.rel.dtors) } +- .rela.dtors : { *(.rela.dtors) } +- .rel.init : { *(.rel.init) } +- .rela.init : { *(.rela.init) } +- .rel.fini : { *(.rel.fini) } +- .rela.fini : { *(.rela.fini) } +- .rel.bss : { *(.rel.bss) } +- .rela.bss : { *(.rela.bss) } +- .rel.plt : { *(.rel.plt) } +- .rela.plt : { *(.rela.plt) } +- .init : { *(.init) } =0x47ff041f +- .text : +- { +- *(.text) +- /* .gnu.warning sections are handled specially by elf32.em. */ +- *(.gnu.warning) +- *(.gnu.linkonce.t*) +- } =0x47ff041f +- _etext = .; +- PROVIDE (etext = .); +- .fini : { *(.fini) } =0x47ff041f +- .rodata : { *(.rodata) *(.gnu.linkonce.r*) } +- .rodata1 : { *(.rodata1) } +- .reginfo : { *(.reginfo) } +- /* Adjust the address for the data segment. We want to adjust up to +- the same address within the page on the next page up. */ +- . = ALIGN(0x100000) + (. & (0x100000 - 1)); +- .data : +- { +- *(.data) +- *(.gnu.linkonce.d*) +- CONSTRUCTORS +- } +- .data1 : { *(.data1) } +- .tdata : { *(.tdata) } +- .tbss : { *(.tbss) } +- .preinit_array : +- { +- PROVIDE (__preinit_array_start = .); +- KEEP (*(.preinit_array)) +- PROVIDE (__preinit_array_end = .); +- } +- .init_array : +- { +- PROVIDE (__init_array_start = .); +- KEEP (*(SORT(.init_array.*))) +- KEEP (*(.init_array)) +- PROVIDE (__init_array_end = .); +- } +- .fini_array : +- { +- PROVIDE (__fini_array_start = .); +- KEEP (*(.fini_array)) +- KEEP (*(SORT(.fini_array.*))) +- PROVIDE (__fini_array_end = .); +- } +- .ctors : +- { +- *(.ctors) +- } +- .dtors : +- { +- *(.dtors) +- } +- .plt : { *(.plt) } +- .got : { *(.got.plt) *(.got) } +- .dynamic : { *(.dynamic) } +- /* We want the small data sections together, so single-instruction offsets +- can access them all, and initialized data all before uninitialized, so +- we can shorten the on-disk segment size. */ +- .sdata : { *(.sdata) } +- _edata = .; +- PROVIDE (edata = .); +- __bss_start = .; +- .sbss : { *(.sbss) *(.scommon) } +- .bss : +- { +- *(.dynbss) +- *(.bss) +- *(COMMON) +- } +- _end = . ; +- PROVIDE (end = .); +- /* Stabs debugging sections. */ +- .stab 0 : { *(.stab) } +- .stabstr 0 : { *(.stabstr) } +- .stab.excl 0 : { *(.stab.excl) } +- .stab.exclstr 0 : { *(.stab.exclstr) } +- .stab.index 0 : { *(.stab.index) } +- .stab.indexstr 0 : { *(.stab.indexstr) } +- .comment 0 : { *(.comment) } +- /* DWARF debug sections. +- Symbols in the DWARF debugging sections are relative to the beginning +- of the section so we begin them at 0. */ +- /* DWARF 1 */ +- .debug 0 : { *(.debug) } +- .line 0 : { *(.line) } +- /* GNU DWARF 1 extensions */ +- .debug_srcinfo 0 : { *(.debug_srcinfo) } +- .debug_sfnames 0 : { *(.debug_sfnames) } +- /* DWARF 1.1 and DWARF 2 */ +- .debug_aranges 0 : { *(.debug_aranges) } +- .debug_pubnames 0 : { *(.debug_pubnames) } +- /* DWARF 2 */ +- .debug_info 0 : { *(.debug_info) } +- .debug_abbrev 0 : { *(.debug_abbrev) } +- .debug_line 0 : { *(.debug_line) } +- .debug_frame 0 : { *(.debug_frame) } +- .debug_str 0 : { *(.debug_str) } +- .debug_loc 0 : { *(.debug_loc) } +- .debug_macinfo 0 : { *(.debug_macinfo) } +- /* SGI/MIPS DWARF 2 extensions */ +- .debug_weaknames 0 : { *(.debug_weaknames) } +- .debug_funcnames 0 : { *(.debug_funcnames) } +- .debug_typenames 0 : { *(.debug_typenames) } +- .debug_varnames 0 : { *(.debug_varnames) } +- /* These must appear regardless of . */ +- /DISCARD/ : { *(.note.GNU-stack) *(.note.ABI-tag) } +-} +diff --git a/ldscripts/sparc64.ld b/ldscripts/sparc64.ld +deleted file mode 100644 +index 9ea4143..0000000 +--- a/ldscripts/sparc64.ld ++++ /dev/null +@@ -1,138 +0,0 @@ +-OUTPUT_FORMAT("elf64-sparc", "elf64-sparc", +- "elf64-sparc") +-OUTPUT_ARCH(sparc:v9) +-ENTRY(_start) +-SECTIONS +-{ +- /* Read-only sections, merged into text segment: */ +- . = 0x60000000 + SIZEOF_HEADERS; +- .interp : { *(.interp) } +- .hash : { *(.hash) } +- .dynsym : { *(.dynsym) } +- .dynstr : { *(.dynstr) } +- .gnu.version : { *(.gnu.version) } +- .gnu.version_d : { *(.gnu.version_d) } +- .gnu.version_r : { *(.gnu.version_r) } +- .rel.text : +- { *(.rel.text) *(.rel.gnu.linkonce.t*) } +- .rela.text : +- { *(.rela.text) *(.rela.gnu.linkonce.t*) } +- .rel.data : +- { *(.rel.data) *(.rel.gnu.linkonce.d*) } +- .rela.data : +- { *(.rela.data) *(.rela.gnu.linkonce.d*) } +- .rel.rodata : +- { *(.rel.rodata) *(.rel.gnu.linkonce.r*) } +- .rela.rodata : +- { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } +- .rel.got : { *(.rel.got) } +- .rela.got : { *(.rela.got) } +- .rel.ctors : { *(.rel.ctors) } +- .rela.ctors : { *(.rela.ctors) } +- .rel.dtors : { *(.rel.dtors) } +- .rela.dtors : { *(.rela.dtors) } +- .rel.init : { *(.rel.init) } +- .rela.init : { *(.rela.init) } +- .rel.fini : { *(.rel.fini) } +- .rela.fini : { *(.rela.fini) } +- .rel.bss : { *(.rel.bss) } +- .rela.bss : { *(.rela.bss) } +- .rel.plt : { *(.rel.plt) } +- .rela.plt : { *(.rela.plt) } +- .init : { *(.init) } =0x47ff041f +- .text : +- { +- *(.text) +- /* .gnu.warning sections are handled specially by elf32.em. */ +- *(.gnu.warning) +- *(.gnu.linkonce.t*) +- } =0x47ff041f +- _etext = .; +- PROVIDE (etext = .); +- .fini : { *(.fini) } =0x47ff041f +- .rodata : { *(.rodata) *(.gnu.linkonce.r*) } +- .rodata1 : { *(.rodata1) } +- . = ALIGN(64 / 8); +- PROVIDE (__preinit_array_start = .); +- .preinit_array : { *(.preinit_array) } +- PROVIDE (__preinit_array_end = .); +- PROVIDE (__init_array_start = .); +- .init_array : { *(.init_array) } +- PROVIDE (__init_array_end = .); +- PROVIDE (__fini_array_start = .); +- .fini_array : { *(.fini_array) } +- PROVIDE (__fini_array_end = .); +- .reginfo : { *(.reginfo) } +- /* Adjust the address for the data segment. We want to adjust up to +- the same address within the page on the next page up. */ +- . = ALIGN(0x100000) + (. & (0x100000 - 1)); +- .data : +- { +- *(.gen_code) +- *(.data) +- *(.gnu.linkonce.d*) +- CONSTRUCTORS +- } +- .data1 : { *(.data1) } +- .ctors : +- { +- *(.ctors) +- } +- .dtors : +- { +- *(.dtors) +- } +- .plt : { *(.plt) } +- .got : { *(.got.plt) *(.got) } +- .dynamic : { *(.dynamic) } +- /* We want the small data sections together, so single-instruction offsets +- can access them all, and initialized data all before uninitialized, so +- we can shorten the on-disk segment size. */ +- .sdata : { *(.sdata) } +- _edata = .; +- PROVIDE (edata = .); +- __bss_start = .; +- .sbss : { *(.sbss) *(.scommon) } +- .bss : +- { +- *(.dynbss) +- *(.bss) +- *(COMMON) +- } +- _end = . ; +- PROVIDE (end = .); +- /* Stabs debugging sections. */ +- .stab 0 : { *(.stab) } +- .stabstr 0 : { *(.stabstr) } +- .stab.excl 0 : { *(.stab.excl) } +- .stab.exclstr 0 : { *(.stab.exclstr) } +- .stab.index 0 : { *(.stab.index) } +- .stab.indexstr 0 : { *(.stab.indexstr) } +- .comment 0 : { *(.comment) } +- /* DWARF debug sections. +- Symbols in the DWARF debugging sections are relative to the beginning +- of the section so we begin them at 0. */ +- /* DWARF 1 */ +- .debug 0 : { *(.debug) } +- .line 0 : { *(.line) } +- /* GNU DWARF 1 extensions */ +- .debug_srcinfo 0 : { *(.debug_srcinfo) } +- .debug_sfnames 0 : { *(.debug_sfnames) } +- /* DWARF 1.1 and DWARF 2 */ +- .debug_aranges 0 : { *(.debug_aranges) } +- .debug_pubnames 0 : { *(.debug_pubnames) } +- /* DWARF 2 */ +- .debug_info 0 : { *(.debug_info) } +- .debug_abbrev 0 : { *(.debug_abbrev) } +- .debug_line 0 : { *(.debug_line) } +- .debug_frame 0 : { *(.debug_frame) } +- .debug_str 0 : { *(.debug_str) } +- .debug_loc 0 : { *(.debug_loc) } +- .debug_macinfo 0 : { *(.debug_macinfo) } +- /* SGI/MIPS DWARF 2 extensions */ +- .debug_weaknames 0 : { *(.debug_weaknames) } +- .debug_funcnames 0 : { *(.debug_funcnames) } +- .debug_typenames 0 : { *(.debug_typenames) } +- .debug_varnames 0 : { *(.debug_varnames) } +- /* These must appear regardless of . */ +-} +diff --git a/ldscripts/x86_64.ld b/ldscripts/x86_64.ld +deleted file mode 100644 +index b7a9f4e..0000000 +--- a/ldscripts/x86_64.ld ++++ /dev/null +@@ -1,180 +0,0 @@ +-/* Default linker script, for normal executables */ +-OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64") +-OUTPUT_ARCH(i386:x86-64) +-ENTRY(_start) +-SECTIONS +-{ +- /* Read-only sections, merged into text segment: */ +- . = 0x60000000 + SIZEOF_HEADERS; +- .interp : { *(.interp) } +- .hash : { *(.hash) } +- .dynsym : { *(.dynsym) } +- .dynstr : { *(.dynstr) } +- .gnu.version : { *(.gnu.version) } +- .gnu.version_d : { *(.gnu.version_d) } +- .gnu.version_r : { *(.gnu.version_r) } +- .rel.init : { *(.rel.init) } +- .rela.init : { *(.rela.init) } +- .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } +- .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } +- .rel.fini : { *(.rel.fini) } +- .rela.fini : { *(.rela.fini) } +- .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } +- .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } +- .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } +- .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } +- .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } +- .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } +- .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } +- .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } +- .rel.ctors : { *(.rel.ctors) } +- .rela.ctors : { *(.rela.ctors) } +- .rel.dtors : { *(.rel.dtors) } +- .rela.dtors : { *(.rela.dtors) } +- .rel.got : { *(.rel.got) } +- .rela.got : { *(.rela.got) } +- .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } +- .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } +- .rel.plt : +- { +- *(.rel.plt) +- PROVIDE (__rel_iplt_start = .); +- *(.rel.iplt) +- PROVIDE (__rel_iplt_end = .); +- } +- .rela.plt : +- { +- *(.rela.plt) +- PROVIDE (__rela_iplt_start = .); +- *(.rela.iplt) +- PROVIDE (__rela_iplt_end = .); +- } +- .init : +- { +- KEEP (*(.init)) +- } =0x90909090 +- .plt : { *(.plt) } +- .text : +- { +- *(.text .stub .text.* .gnu.linkonce.t.*) +- /* .gnu.warning sections are handled specially by elf32.em. */ +- *(.gnu.warning) +- } =0x90909090 +- .fini : +- { +- KEEP (*(.fini)) +- } =0x90909090 +- PROVIDE (__etext = .); +- PROVIDE (_etext = .); +- PROVIDE (etext = .); +- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } +- .rodata1 : { *(.rodata1) } +- .eh_frame_hdr : { *(.eh_frame_hdr) } +- /* Adjust the address for the data segment. We want to adjust up to +- the same address within the page on the next page up. */ +- . = ALIGN (0x100000) - ((0x100000 - .) & (0x100000 - 1)); . = DATA_SEGMENT_ALIGN (0x100000, 0x1000); +- /* Ensure the __preinit_array_start label is properly aligned. We +- could instead move the label definition inside the section, but +- the linker would then create the section even if it turns out to +- be empty, which isn't pretty. */ +- . = ALIGN(64 / 8); +- PROVIDE (__preinit_array_start = .); +- .preinit_array : { *(.preinit_array) } +- PROVIDE (__preinit_array_end = .); +- PROVIDE (__init_array_start = .); +- .init_array : { *(.init_array) } +- PROVIDE (__init_array_end = .); +- PROVIDE (__fini_array_start = .); +- .fini_array : { *(.fini_array) } +- PROVIDE (__fini_array_end = .); +- .data : +- { +- *(.data .data.* .gnu.linkonce.d.*) +- SORT(CONSTRUCTORS) +- } +- .data1 : { *(.data1) } +- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } +- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } +- .eh_frame : { KEEP (*(.eh_frame)) } +- .gcc_except_table : { *(.gcc_except_table) } +- .dynamic : { *(.dynamic) } +- .ctors : +- { +- /* gcc uses crtbegin.o to find the start of +- the constructors, so we make sure it is +- first. Because this is a wildcard, it +- doesn't matter if the user does not +- actually link against crtbegin.o; the +- linker won't look for a file to match a +- wildcard. The wildcard also means that it +- doesn't matter which directory crtbegin.o +- is in. */ +- KEEP (*crtbegin.o(.ctors)) +- /* We don't want to include the .ctor section from +- from the crtend.o file until after the sorted ctors. +- The .ctor section from the crtend file contains the +- end of ctors marker and it must be last */ +- KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors)) +- KEEP (*(SORT(.ctors.*))) +- KEEP (*(.ctors)) +- } +- .dtors : +- { +- KEEP (*crtbegin.o(.dtors)) +- KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors)) +- KEEP (*(SORT(.dtors.*))) +- KEEP (*(.dtors)) +- } +- .jcr : { KEEP (*(.jcr)) } +- .got : { *(.got.plt) *(.got) } +- _edata = .; +- PROVIDE (edata = .); +- __bss_start = .; +- .bss : +- { +- *(.dynbss) +- *(.bss .bss.* .gnu.linkonce.b.*) +- *(COMMON) +- /* Align here to ensure that the .bss section occupies space up to +- _end. Align after .bss to ensure correct alignment even if the +- .bss section disappears because there are no input sections. */ +- . = ALIGN(64 / 8); +- } +- . = ALIGN(64 / 8); +- _end = .; +- PROVIDE (end = .); +- . = DATA_SEGMENT_END (.); +- /* Stabs debugging sections. */ +- .stab 0 : { *(.stab) } +- .stabstr 0 : { *(.stabstr) } +- .stab.excl 0 : { *(.stab.excl) } +- .stab.exclstr 0 : { *(.stab.exclstr) } +- .stab.index 0 : { *(.stab.index) } +- .stab.indexstr 0 : { *(.stab.indexstr) } +- .comment 0 : { *(.comment) } +- /* DWARF debug sections. +- Symbols in the DWARF debugging sections are relative to the beginning +- of the section so we begin them at 0. */ +- /* DWARF 1 */ +- .debug 0 : { *(.debug) } +- .line 0 : { *(.line) } +- /* GNU DWARF 1 extensions */ +- .debug_srcinfo 0 : { *(.debug_srcinfo) } +- .debug_sfnames 0 : { *(.debug_sfnames) } +- /* DWARF 1.1 and DWARF 2 */ +- .debug_aranges 0 : { *(.debug_aranges) } +- .debug_pubnames 0 : { *(.debug_pubnames) } +- /* DWARF 2 */ +- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } +- .debug_abbrev 0 : { *(.debug_abbrev) } +- .debug_line 0 : { *(.debug_line) } +- .debug_frame 0 : { *(.debug_frame) } +- .debug_str 0 : { *(.debug_str) } +- .debug_loc 0 : { *(.debug_loc) } +- .debug_macinfo 0 : { *(.debug_macinfo) } +- /* SGI/MIPS DWARF 2 extensions */ +- .debug_weaknames 0 : { *(.debug_weaknames) } +- .debug_funcnames 0 : { *(.debug_funcnames) } +- .debug_typenames 0 : { *(.debug_typenames) } +- .debug_varnames 0 : { *(.debug_varnames) } +-} diff --git a/emulators/qemu-devel/files/patch-configure-ld-1a1c9ef4d3da2ff1965e8037d7d30b77884c869f b/emulators/qemu-devel/files/patch-configure-ld-1a1c9ef4d3da2ff1965e8037d7d30b77884c869f new file mode 100644 index 000000000000..9aabe0933afe --- /dev/null +++ b/emulators/qemu-devel/files/patch-configure-ld-1a1c9ef4d3da2ff1965e8037d7d30b77884c869f @@ -0,0 +1,36 @@ +diff --git a/configure b/configure +index 9d46354..b3025df 100755 +--- a/configure ++++ b/configure +@@ -4438,17 +4438,18 @@ if test "$target_linux_user" = "yes" -o "$target_bsd_user" = "yes" ; then + textseg_addr= + case "$ARCH" in + arm | hppa | i386 | ia64 | m68k | ppc | ppc64 | s390 | sparc | sparc64 | x86_64) +- default_textseg_addr=0x400000 + textseg_addr=0x60000000 + ;; + mips) +- default_textseg_addr=0x120000000 + textseg_addr=0x400000 + ;; + esac + if [ -n "$textseg_addr" ]; then ++cat > $TMPC <<EOF ++int main(void) { return 0; } ++EOF + try_ldflags="-Ttext-segment=$textseg_addr" +- if $ld $try_ldflags /dev/null >/dev/null 2>&1; then ++ if compile_prog "" "$try_ldflags"; then + ldflags="$ldflags $try_ldflags" + else + # In case ld does not support -Ttext-segment, edit the default linker +@@ -4457,7 +4458,8 @@ if test "$target_linux_user" = "yes" -o "$target_bsd_user" = "yes" ; then + $ld --verbose | sed \ + -e '1,/==================================================/d' \ + -e '/==================================================/,$d' \ +- -e "s/$default_textseg_addr/$textseg_addr/g" > config-host.ld ++ -e "s/[.] = [0-9a-fx]* [+] SIZEOF_HEADERS/. = $textseg_addr + SIZEOF_HEADERS/" \ ++ -e "s/__executable_start = [0-9a-fx]*/__executable_start = $textseg_addr/" > config-host.ld + ldflags="$ldflags -Wl,-T../config-host.ld" + fi + fi diff --git a/emulators/qemu-devel/files/patch-include-qemu-aes.h b/emulators/qemu-devel/files/patch-include-qemu-aes.h new file mode 100644 index 000000000000..7c9b8d1d52d9 --- /dev/null +++ b/emulators/qemu-devel/files/patch-include-qemu-aes.h @@ -0,0 +1,18 @@ +--- a/include/qemu/aes.h ++++ b/include/qemu/aes.h +@@ -10,6 +10,15 @@ struct aes_key_st { + }; + typedef struct aes_key_st AES_KEY; + ++/* FreeBSD has it's own AES_set_decrypt_key in -lcrypto, avoid conflicts */ ++#ifdef __FreeBSD__ ++#define AES_set_encrypt_key QEMU_AES_set_encrypt_key ++#define AES_set_decrypt_key QEMU_AES_set_decrypt_key ++#define AES_encrypt QEMU_AES_encrypt ++#define AES_decrypt QEMU_AES_decrypt ++#define AES_cbc_encrypt QEMU_AES_cbc_encrypt ++#endif ++ + int AES_set_encrypt_key(const unsigned char *userKey, const int bits, + AES_KEY *key); + int AES_set_decrypt_key(const unsigned char *userKey, const int bits, diff --git a/emulators/qemu-devel/files/patch-include-qemu-common.h b/emulators/qemu-devel/files/patch-include-qemu-common.h deleted file mode 100644 index 59f2254049df..000000000000 --- a/emulators/qemu-devel/files/patch-include-qemu-common.h +++ /dev/null @@ -1,30 +0,0 @@ -From brad@comstyle.com Tue May 21 22:45:57 CEST 2013 -From: brad@comstyle.com (Brad Smith) -Subject: [Qemu-devel] [PATCH] ui/gtk.c: Fix *BSD build of Gtk+ UI -Date: Tue, 21 May 2013 12:14:24 -0400 -Message-ID: <20130521161324.GA29977@rox.home.comstyle.com> - -Fix the build of the Gtk+ UI on *BSD systems. - -Signed-off-by: Brad Smith <brad@comstyle.com> - -diff --git a/include/qemu-common.h b/include/qemu-common.h -index af769f5..c944bb7 100644 ---- a/include/qemu-common.h -+++ b/include/qemu-common.h -@@ -45,6 +45,7 @@ - #if defined(__GLIBC__) - # include <pty.h> - #elif defined CONFIG_BSD -+# include <termios.h> - # if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) - # include <libutil.h> - # else - --- -This message has been scanned for viruses and -dangerous content by MailScanner, and is -believed to be clean. - - - diff --git a/emulators/qemu-devel/files/patch-ppc.ld b/emulators/qemu-devel/files/patch-ppc.ld deleted file mode 100644 index bcd45b4657e9..000000000000 --- a/emulators/qemu-devel/files/patch-ppc.ld +++ /dev/null @@ -1,41 +0,0 @@ ---- a/ldscripts/ppc.ld -+++ b/ldscripts/ppc.ld -@@ -99,7 +99,7 @@ SECTIONS - PROVIDE (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array)) -- PROVIDE (__init_array_end = .); -+ PROVIDE(__init_array_end = .); - } - .fini_array : - { -@@ -140,9 +140,8 @@ SECTIONS - .got1 : { *(.got1) } - .got2 : { *(.got2) } - .dynamic : { *(.dynamic) } -- .got : SPECIAL { *(.got) } -- . = DATA_SEGMENT_RELRO_END (0, .); -- .plt : SPECIAL { *(.plt) } -+ .got : { *(.got) } -+ .plt : { *(.plt) } - .data : - { - *(.data .data.* .gnu.linkonce.d.*) -@@ -150,7 +149,7 @@ SECTIONS - SORT(CONSTRUCTORS) - } - .data1 : { *(.data1) } -- .got : SPECIAL { *(.got) } -+ .got : { *(.got) } - /* We want the small data sections together, so single-instruction offsets - can access them all, and initialized data all before uninitialized, so - we can shorten the on-disk segment size. */ -@@ -169,7 +168,7 @@ SECTIONS - *(.scommon) - PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .); - } -- .plt : SPECIAL { *(.plt) } -+ .plt : { *(.plt) } - .bss : - { - *(.dynbss) diff --git a/emulators/qemu-devel/files/patch-z9c-bsd-user-sson003c b/emulators/qemu-devel/files/patch-z9c-bsd-user-sson003c index 2161ac6b14ee..b80d91863a19 100644 --- a/emulators/qemu-devel/files/patch-z9c-bsd-user-sson003c +++ b/emulators/qemu-devel/files/patch-z9c-bsd-user-sson003c @@ -2406,20 +2406,3 @@ index d99584d..6d17c97 100755 fi if test "$pie" = ""; then -diff --git a/util/aes.c b/util/aes.c -index 1da7bff..30a6608 100644 ---- a/util/aes.c -+++ b/util/aes.c -@@ -877,6 +877,7 @@ int AES_set_decrypt_key(const unsigned char *userKey, const int bits, - return 0; - } - -+#if defined(CONFIG_STATIC) && ! defined(__FreeBSD__) - #ifndef AES_ASM - /* - * Encrypt a single block -@@ -1312,3 +1313,4 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, - } - } - } -+#endif /* CONFIG_STATIC && ! __FreeBSD__ */ diff --git a/emulators/qemu-devel/files/pcap-patch b/emulators/qemu-devel/files/pcap-patch index 8586052d698c..1428b20345c3 100644 --- a/emulators/qemu-devel/files/pcap-patch +++ b/emulators/qemu-devel/files/pcap-patch @@ -37,7 +37,7 @@ + else + libpcap=-lwpcap + fi -+ if compile_prog "$libpcap" ; then ++ if compile_prog "" "$libpcap" ; then + : + else + echo @@ -54,7 +54,7 @@ + return (pcap_create("foo", errbuf) == (pcap_t *)0 ? 1 : 0); +} +EOF -+ if compile_prog "$libpcap" ; then ++ if compile_prog "" "$libpcap" ; then + pcap_create="yes" + fi + cat > $TMPC << EOF @@ -376,3 +376,13 @@ Index: net/net.c 'socket': 'NetdevSocketOptions', 'vde': 'NetdevVdeOptions', 'dump': 'NetdevDumpOptions', +--- net/hub.c.orig ++++ net/hub.c +@@ -322,6 +322,7 @@ void net_hub_check_clients(void) + case NET_CLIENT_OPTIONS_KIND_TAP: + case NET_CLIENT_OPTIONS_KIND_SOCKET: + case NET_CLIENT_OPTIONS_KIND_VDE: ++ case NET_CLIENT_OPTIONS_KIND_PCAP: + has_host_dev = 1; + break; + default: |