From: Lionel Sambuc Date: Mon, 8 Apr 2013 21:11:36 +0000 (+0200) Subject: Upgrading to binutils-2.22 X-Git-Tag: v3.3.0~897 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=4af66e563d8fb03388d6cdb1fb05cd2ce5f82d6b;p=minix.git Upgrading to binutils-2.22 * Added --with-ld=default * Added --with-lto * Fixed ld script for ARM * Options are prepared for future activation of gold. Change-Id: Id9618904055e18d1b37f5e9585f775c367ff356e --- diff --git a/distrib/sets/lists/minix/mi b/distrib/sets/lists/minix/mi index 8701b038d..ad332a942 100644 --- a/distrib/sets/lists/minix/mi +++ b/distrib/sets/lists/minix/mi @@ -315,6 +315,7 @@ ./usr/bin/ifconfig minix-sys ./usr/bin/ifdef minix-sys ./usr/bin/indent minix-sys +./usr/bin/in.fingerd minix-sys obsolete ./usr/bin/infocmp minix-sys ./usr/bin/in.rshd minix-sys ./usr/bin/install minix-sys diff --git a/external/gpl3/binutils/fetch.sh b/external/gpl3/binutils/fetch.sh index 4cf92147c..8cce87ba6 100755 --- a/external/gpl3/binutils/fetch.sh +++ b/external/gpl3/binutils/fetch.sh @@ -5,8 +5,8 @@ echo $0 cd `dirname $0` # Configure fetch method -URL="http://www.minix3.org/distfiles-minix/binutils-2.21.1.tar.bz2" -BACKUP_URL="http://ftp.gnu.org/gnu/binutils/binutils-2.21.1.tar.bz2" +URL="http://www.minix3.org/distfiles-minix/binutils-2.22.tar.bz2" +BACKUP_URL="http://ftp.gnu.org/gnu/binutils/binutils-2.22.tar.bz2" FETCH=wget which curl >/dev/null if [ $? -eq 0 ]; then @@ -16,15 +16,15 @@ fi # Fetch sources if not available if [ ! -d dist ]; then - if [ ! -f binutils-2.21.1.tar.bz2 ]; then + if [ ! -f binutils-2.22.tar.bz2 ]; then $FETCH $URL if [ $? -ne 0 ]; then $FETCH $BACKUP_URL fi fi - tar -oxjf binutils-2.21.1.tar.bz2 && \ - mv binutils-2.21.1 dist && \ + tar -oxjf binutils-2.22.tar.bz2 && \ + mv binutils-2.22 dist && \ cd dist && \ cat ../patches/* | patch -p1 fi diff --git a/external/gpl3/binutils/ldscripts/elf_earm_minix.x b/external/gpl3/binutils/ldscripts/elf_earm_minix.x index 133553699..19af33643 100644 --- a/external/gpl3/binutils/ldscripts/elf_earm_minix.x +++ b/external/gpl3/binutils/ldscripts/elf_earm_minix.x @@ -69,7 +69,6 @@ SECTIONS .iplt : { *(.iplt) } .text : { - PROVIDE_HIDDEN (__eprol = .); *(.text.unlikely .text.*_unlikely) *(.text.exit .text.exit.*) *(.text.startup .text.startup.*) @@ -94,13 +93,18 @@ SECTIONS PROVIDE_HIDDEN (__exidx_end = .); .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.*) } + .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table + .gcc_except_table.*) } + /* These sections are generated by the Sun/Oracle C++ compiler. */ + .exception_ranges : ONLY_IF_RO { *(.exception_ranges + .exception_ranges*) } /* 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(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)); /* Exception handling */ .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } + .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } /* Thread Local Storage sections */ .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } diff --git a/external/gpl3/binutils/ldscripts/elf_earm_minix.xbn b/external/gpl3/binutils/ldscripts/elf_earm_minix.xbn index 45d478844..71261df69 100644 --- a/external/gpl3/binutils/ldscripts/elf_earm_minix.xbn +++ b/external/gpl3/binutils/ldscripts/elf_earm_minix.xbn @@ -69,7 +69,6 @@ SECTIONS .iplt : { *(.iplt) } .text : { - PROVIDE_HIDDEN (__eprol = .); *(.text.unlikely .text.*_unlikely) *(.text.exit .text.exit.*) *(.text.startup .text.startup.*) @@ -94,13 +93,18 @@ SECTIONS PROVIDE_HIDDEN (__exidx_end = .); .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.*) } + .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table + .gcc_except_table.*) } + /* These sections are generated by the Sun/Oracle C++ compiler. */ + .exception_ranges : ONLY_IF_RO { *(.exception_ranges + .exception_ranges*) } /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ . = .; /* Exception handling */ .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } + .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } /* Thread Local Storage sections */ .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } diff --git a/external/gpl3/binutils/ldscripts/elf_earm_minix.xc b/external/gpl3/binutils/ldscripts/elf_earm_minix.xc index 23232babc..7c1860a31 100644 --- a/external/gpl3/binutils/ldscripts/elf_earm_minix.xc +++ b/external/gpl3/binutils/ldscripts/elf_earm_minix.xc @@ -72,7 +72,6 @@ SECTIONS .iplt : { *(.iplt) } .text : { - PROVIDE_HIDDEN (__eprol = .); *(.text.unlikely .text.*_unlikely) *(.text.exit .text.exit.*) *(.text.startup .text.startup.*) @@ -97,13 +96,18 @@ SECTIONS PROVIDE_HIDDEN (__exidx_end = .); .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.*) } + .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table + .gcc_except_table.*) } + /* These sections are generated by the Sun/Oracle C++ compiler. */ + .exception_ranges : ONLY_IF_RO { *(.exception_ranges + .exception_ranges*) } /* 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(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)); /* Exception handling */ .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } + .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } /* Thread Local Storage sections */ .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } diff --git a/external/gpl3/binutils/ldscripts/elf_earm_minix.xd b/external/gpl3/binutils/ldscripts/elf_earm_minix.xd new file mode 100644 index 000000000..ad493451a --- /dev/null +++ b/external/gpl3/binutils/ldscripts/elf_earm_minix.xd @@ -0,0 +1,237 @@ +/* Script for ld -pie: link position independent executable */ +OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", + "elf32-littlearm") +OUTPUT_ARCH(arm) +ENTRY(_start) +SEARCH_DIR("=/usr/lib"); +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + . = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS; + .interp : { *(.interp) } + .note.gnu.build-id : { *(.note.gnu.build-id) } + .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.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.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } + .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } + .rel.iplt : + { + PROVIDE_HIDDEN (__rel_iplt_start = .); + *(.rel.iplt) + PROVIDE_HIDDEN (__rel_iplt_end = .); + } + .rela.iplt : + { + PROVIDE_HIDDEN (__rela_iplt_start = .); + *(.rela.iplt) + PROVIDE_HIDDEN (__rela_iplt_end = .); + } + .rel.plt : + { + *(.rel.plt) + } + .rela.plt : + { + *(.rela.plt) + } + .init : + { + KEEP (*(.init)) + } =0 + .plt : { *(.plt) } + .iplt : { *(.iplt) } + .text : + { + *(.text.unlikely .text.*_unlikely) + *(.text.exit .text.exit.*) + *(.text.startup .text.startup.*) + *(.text.hot .text.hot.*) + *(.text .stub .text.* .gnu.linkonce.t.*) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + *(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx) + } =0 + .fini : + { + KEEP (*(.fini)) + } =0 + PROVIDE (__etext = .); + PROVIDE (_etext = .); + PROVIDE (etext = .); + .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } + .rodata1 : { *(.rodata1) } + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } + PROVIDE_HIDDEN (__exidx_start = .); + .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } + PROVIDE_HIDDEN (__exidx_end = .); + .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.*) } + /* These sections are generated by the Sun/Oracle C++ compiler. */ + .exception_ranges : ONLY_IF_RO { *(.exception_ranges + .exception_ranges*) } + /* 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 (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.*) } + .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } + /* Thread Local Storage sections */ + .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } + .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } + .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 (*(SORT(.fini_array.*))) + KEEP (*(.fini_array)) + PROVIDE_HIDDEN (__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)) + 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 *crtend?.o ) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + } + .dtors : + { + KEEP (*crtbegin.o(.dtors)) + KEEP (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *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_SEGMENT_RELRO_END (0, .); + .got : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) } + .data : + { + PROVIDE (__data_start = .); + *(.data .data.* .gnu.linkonce.d.*) + SORT(CONSTRUCTORS) + } + .data1 : { *(.data1) } + _edata = .; PROVIDE (edata = .); + __bss_start = .; + __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. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); + } + _bss_end__ = . ; __bss_end__ = . ; + . = ALIGN(32 / 8); + . = ALIGN(32 / 8); + __end__ = . ; + _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) } + /* DWARF 3 */ + .debug_pubtypes 0 : { *(.debug_pubtypes) } + .debug_ranges 0 : { *(.debug_ranges) } + .stack 0x80000 : + { + _stack = .; + *(.stack) + } + .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) } + .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } +} diff --git a/external/gpl3/binutils/ldscripts/elf_earm_minix.xdc b/external/gpl3/binutils/ldscripts/elf_earm_minix.xdc new file mode 100644 index 000000000..b60baafd0 --- /dev/null +++ b/external/gpl3/binutils/ldscripts/elf_earm_minix.xdc @@ -0,0 +1,240 @@ +/* Script for -pie -z combreloc: position independent executable, combine & sort relocs */ +OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", + "elf32-littlearm") +OUTPUT_ARCH(arm) +ENTRY(_start) +SEARCH_DIR("=/usr/lib"); +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + . = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS; + .interp : { *(.interp) } + .note.gnu.build-id : { *(.note.gnu.build-id) } + .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.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.*) + PROVIDE_HIDDEN (__rel_iplt_start = .); + *(.rel.iplt) + PROVIDE_HIDDEN (__rel_iplt_end = .); + PROVIDE_HIDDEN (__rela_iplt_start = .); + PROVIDE_HIDDEN (__rela_iplt_end = .); + } + .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.*) + PROVIDE_HIDDEN (__rel_iplt_start = .); + PROVIDE_HIDDEN (__rel_iplt_end = .); + PROVIDE_HIDDEN (__rela_iplt_start = .); + *(.rela.iplt) + PROVIDE_HIDDEN (__rela_iplt_end = .); + } + .rel.plt : + { + *(.rel.plt) + } + .rela.plt : + { + *(.rela.plt) + } + .init : + { + KEEP (*(.init)) + } =0 + .plt : { *(.plt) } + .iplt : { *(.iplt) } + .text : + { + *(.text.unlikely .text.*_unlikely) + *(.text.exit .text.exit.*) + *(.text.startup .text.startup.*) + *(.text.hot .text.hot.*) + *(.text .stub .text.* .gnu.linkonce.t.*) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + *(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx) + } =0 + .fini : + { + KEEP (*(.fini)) + } =0 + PROVIDE (__etext = .); + PROVIDE (_etext = .); + PROVIDE (etext = .); + .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } + .rodata1 : { *(.rodata1) } + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } + PROVIDE_HIDDEN (__exidx_start = .); + .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } + PROVIDE_HIDDEN (__exidx_end = .); + .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.*) } + /* These sections are generated by the Sun/Oracle C++ compiler. */ + .exception_ranges : ONLY_IF_RO { *(.exception_ranges + .exception_ranges*) } + /* 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 (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.*) } + .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } + /* Thread Local Storage sections */ + .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } + .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } + .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 (*(SORT(.fini_array.*))) + KEEP (*(.fini_array)) + PROVIDE_HIDDEN (__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)) + 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 *crtend?.o ) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + } + .dtors : + { + KEEP (*crtbegin.o(.dtors)) + KEEP (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *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_SEGMENT_RELRO_END (0, .); + .got : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) } + .data : + { + PROVIDE (__data_start = .); + *(.data .data.* .gnu.linkonce.d.*) + SORT(CONSTRUCTORS) + } + .data1 : { *(.data1) } + _edata = .; PROVIDE (edata = .); + __bss_start = .; + __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. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); + } + _bss_end__ = . ; __bss_end__ = . ; + . = ALIGN(32 / 8); + . = ALIGN(32 / 8); + __end__ = . ; + _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) } + /* DWARF 3 */ + .debug_pubtypes 0 : { *(.debug_pubtypes) } + .debug_ranges 0 : { *(.debug_ranges) } + .stack 0x80000 : + { + _stack = .; + *(.stack) + } + .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) } + .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } +} diff --git a/external/gpl3/binutils/ldscripts/elf_earm_minix.xdw b/external/gpl3/binutils/ldscripts/elf_earm_minix.xdw new file mode 100644 index 000000000..f85899e92 --- /dev/null +++ b/external/gpl3/binutils/ldscripts/elf_earm_minix.xdw @@ -0,0 +1,240 @@ +/* Script for -pie -z combreloc -z now -z relro: position independent executable, combine & sort relocs */ +OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", + "elf32-littlearm") +OUTPUT_ARCH(arm) +ENTRY(_start) +SEARCH_DIR("=/usr/lib"); +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + . = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS; + .interp : { *(.interp) } + .note.gnu.build-id : { *(.note.gnu.build-id) } + .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.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.*) + PROVIDE_HIDDEN (__rel_iplt_start = .); + *(.rel.iplt) + PROVIDE_HIDDEN (__rel_iplt_end = .); + PROVIDE_HIDDEN (__rela_iplt_start = .); + PROVIDE_HIDDEN (__rela_iplt_end = .); + } + .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.*) + PROVIDE_HIDDEN (__rel_iplt_start = .); + PROVIDE_HIDDEN (__rel_iplt_end = .); + PROVIDE_HIDDEN (__rela_iplt_start = .); + *(.rela.iplt) + PROVIDE_HIDDEN (__rela_iplt_end = .); + } + .rel.plt : + { + *(.rel.plt) + } + .rela.plt : + { + *(.rela.plt) + } + .init : + { + KEEP (*(.init)) + } =0 + .plt : { *(.plt) } + .iplt : { *(.iplt) } + .text : + { + *(.text.unlikely .text.*_unlikely) + *(.text.exit .text.exit.*) + *(.text.startup .text.startup.*) + *(.text.hot .text.hot.*) + *(.text .stub .text.* .gnu.linkonce.t.*) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + *(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx) + } =0 + .fini : + { + KEEP (*(.fini)) + } =0 + PROVIDE (__etext = .); + PROVIDE (_etext = .); + PROVIDE (etext = .); + .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } + .rodata1 : { *(.rodata1) } + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } + PROVIDE_HIDDEN (__exidx_start = .); + .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } + PROVIDE_HIDDEN (__exidx_end = .); + .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.*) } + /* These sections are generated by the Sun/Oracle C++ compiler. */ + .exception_ranges : ONLY_IF_RO { *(.exception_ranges + .exception_ranges*) } + /* 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 (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.*) } + .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } + /* Thread Local Storage sections */ + .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } + .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } + .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 (*(SORT(.fini_array.*))) + KEEP (*(.fini_array)) + PROVIDE_HIDDEN (__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)) + 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 *crtend?.o ) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + } + .dtors : + { + KEEP (*crtbegin.o(.dtors)) + KEEP (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *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) } + .got : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) } + . = DATA_SEGMENT_RELRO_END (0, .); + .data : + { + PROVIDE (__data_start = .); + *(.data .data.* .gnu.linkonce.d.*) + SORT(CONSTRUCTORS) + } + .data1 : { *(.data1) } + _edata = .; PROVIDE (edata = .); + __bss_start = .; + __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. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); + } + _bss_end__ = . ; __bss_end__ = . ; + . = ALIGN(32 / 8); + . = ALIGN(32 / 8); + __end__ = . ; + _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) } + /* DWARF 3 */ + .debug_pubtypes 0 : { *(.debug_pubtypes) } + .debug_ranges 0 : { *(.debug_ranges) } + .stack 0x80000 : + { + _stack = .; + *(.stack) + } + .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) } + .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } +} diff --git a/external/gpl3/binutils/ldscripts/elf_earm_minix.xn b/external/gpl3/binutils/ldscripts/elf_earm_minix.xn index 1682d3bae..1bffbef80 100644 --- a/external/gpl3/binutils/ldscripts/elf_earm_minix.xn +++ b/external/gpl3/binutils/ldscripts/elf_earm_minix.xn @@ -69,7 +69,6 @@ SECTIONS .iplt : { *(.iplt) } .text : { - PROVIDE_HIDDEN (__eprol = .); *(.text.unlikely .text.*_unlikely) *(.text.exit .text.exit.*) *(.text.startup .text.startup.*) @@ -94,13 +93,18 @@ SECTIONS PROVIDE_HIDDEN (__exidx_end = .); .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.*) } + .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table + .gcc_except_table.*) } + /* These sections are generated by the Sun/Oracle C++ compiler. */ + .exception_ranges : ONLY_IF_RO { *(.exception_ranges + .exception_ranges*) } /* 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(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)); /* Exception handling */ .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } + .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } /* Thread Local Storage sections */ .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } diff --git a/external/gpl3/binutils/ldscripts/elf_earm_minix.xr b/external/gpl3/binutils/ldscripts/elf_earm_minix.xr index 3f6f8dd48..53d7b6cc5 100644 --- a/external/gpl3/binutils/ldscripts/elf_earm_minix.xr +++ b/external/gpl3/binutils/ldscripts/elf_earm_minix.xr @@ -80,12 +80,17 @@ SECTIONS .ARM.exidx 0 : { *(.ARM.exidx) } .eh_frame_hdr : { *(.eh_frame_hdr) } .eh_frame 0 : ONLY_IF_RO { KEEP (*(.eh_frame)) } - .gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table + .gcc_except_table.*) } + /* These sections are generated by the Sun/Oracle C++ compiler. */ + .exception_ranges 0 : ONLY_IF_RO { *(.exception_ranges + .exception_ranges*) } /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ /* Exception handling */ .eh_frame 0 : ONLY_IF_RW { KEEP (*(.eh_frame)) } .gcc_except_table 0 : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } + .exception_ranges 0 : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } /* Thread Local Storage sections */ .tdata 0 : { *(.tdata) } .tbss 0 : { *(.tbss) } diff --git a/external/gpl3/binutils/ldscripts/elf_earm_minix.xs b/external/gpl3/binutils/ldscripts/elf_earm_minix.xs index 8fc61ffe6..84af3d6eb 100644 --- a/external/gpl3/binutils/ldscripts/elf_earm_minix.xs +++ b/external/gpl3/binutils/ldscripts/elf_earm_minix.xs @@ -64,7 +64,6 @@ SECTIONS .iplt : { *(.iplt) } .text : { - PROVIDE_HIDDEN (__eprol = .); *(.text.unlikely .text.*_unlikely) *(.text.exit .text.exit.*) *(.text.startup .text.startup.*) @@ -89,13 +88,18 @@ SECTIONS PROVIDE_HIDDEN (__exidx_end = .); .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.*) } + .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table + .gcc_except_table.*) } + /* These sections are generated by the Sun/Oracle C++ compiler. */ + .exception_ranges : ONLY_IF_RO { *(.exception_ranges + .exception_ranges*) } /* 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(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)); /* Exception handling */ .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } + .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } /* Thread Local Storage sections */ .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } diff --git a/external/gpl3/binutils/ldscripts/elf_earm_minix.xsc b/external/gpl3/binutils/ldscripts/elf_earm_minix.xsc index 1ebdc9d19..e55c5e289 100644 --- a/external/gpl3/binutils/ldscripts/elf_earm_minix.xsc +++ b/external/gpl3/binutils/ldscripts/elf_earm_minix.xsc @@ -63,7 +63,6 @@ SECTIONS .iplt : { *(.iplt) } .text : { - PROVIDE_HIDDEN (__eprol = .); *(.text.unlikely .text.*_unlikely) *(.text.exit .text.exit.*) *(.text.startup .text.startup.*) @@ -88,13 +87,18 @@ SECTIONS PROVIDE_HIDDEN (__exidx_end = .); .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.*) } + .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table + .gcc_except_table.*) } + /* These sections are generated by the Sun/Oracle C++ compiler. */ + .exception_ranges : ONLY_IF_RO { *(.exception_ranges + .exception_ranges*) } /* 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(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)); /* Exception handling */ .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } + .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } /* Thread Local Storage sections */ .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } diff --git a/external/gpl3/binutils/ldscripts/elf_earm_minix.xsw b/external/gpl3/binutils/ldscripts/elf_earm_minix.xsw index e24fe0dd0..4eb92b760 100644 --- a/external/gpl3/binutils/ldscripts/elf_earm_minix.xsw +++ b/external/gpl3/binutils/ldscripts/elf_earm_minix.xsw @@ -63,7 +63,6 @@ SECTIONS .iplt : { *(.iplt) } .text : { - PROVIDE_HIDDEN (__eprol = .); *(.text.unlikely .text.*_unlikely) *(.text.exit .text.exit.*) *(.text.startup .text.startup.*) @@ -88,13 +87,18 @@ SECTIONS PROVIDE_HIDDEN (__exidx_end = .); .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.*) } + .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table + .gcc_except_table.*) } + /* These sections are generated by the Sun/Oracle C++ compiler. */ + .exception_ranges : ONLY_IF_RO { *(.exception_ranges + .exception_ranges*) } /* 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(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)); /* Exception handling */ .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } + .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } /* Thread Local Storage sections */ .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } diff --git a/external/gpl3/binutils/ldscripts/elf_earm_minix.xu b/external/gpl3/binutils/ldscripts/elf_earm_minix.xu index 716c80ed2..5dac4ef3e 100644 --- a/external/gpl3/binutils/ldscripts/elf_earm_minix.xu +++ b/external/gpl3/binutils/ldscripts/elf_earm_minix.xu @@ -80,12 +80,17 @@ SECTIONS .ARM.exidx 0 : { *(.ARM.exidx) } .eh_frame_hdr : { *(.eh_frame_hdr) } .eh_frame 0 : ONLY_IF_RO { KEEP (*(.eh_frame)) } - .gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table + .gcc_except_table.*) } + /* These sections are generated by the Sun/Oracle C++ compiler. */ + .exception_ranges 0 : ONLY_IF_RO { *(.exception_ranges + .exception_ranges*) } /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ /* Exception handling */ .eh_frame 0 : ONLY_IF_RW { KEEP (*(.eh_frame)) } .gcc_except_table 0 : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } + .exception_ranges 0 : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } /* Thread Local Storage sections */ .tdata 0 : { *(.tdata) } .tbss 0 : { *(.tbss) } diff --git a/external/gpl3/binutils/ldscripts/elf_earm_minix.xw b/external/gpl3/binutils/ldscripts/elf_earm_minix.xw index 339c8f61b..18ca9bc2f 100644 --- a/external/gpl3/binutils/ldscripts/elf_earm_minix.xw +++ b/external/gpl3/binutils/ldscripts/elf_earm_minix.xw @@ -72,7 +72,6 @@ SECTIONS .iplt : { *(.iplt) } .text : { - PROVIDE_HIDDEN (__eprol = .); *(.text.unlikely .text.*_unlikely) *(.text.exit .text.exit.*) *(.text.startup .text.startup.*) @@ -97,13 +96,18 @@ SECTIONS PROVIDE_HIDDEN (__exidx_end = .); .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.*) } + .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table + .gcc_except_table.*) } + /* These sections are generated by the Sun/Oracle C++ compiler. */ + .exception_ranges : ONLY_IF_RO { *(.exception_ranges + .exception_ranges*) } /* 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(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)); /* Exception handling */ .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } + .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } /* Thread Local Storage sections */ .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } diff --git a/external/gpl3/binutils/ldscripts/elf_i386_minix.x b/external/gpl3/binutils/ldscripts/elf_i386_minix.x index a17b3798e..819436038 100644 --- a/external/gpl3/binutils/ldscripts/elf_i386_minix.x +++ b/external/gpl3/binutils/ldscripts/elf_i386_minix.x @@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf32-i386-minix", "elf32-i386-minix", "elf32-i386-minix") OUTPUT_ARCH(i386) ENTRY(_start) -SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); +SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ diff --git a/external/gpl3/binutils/ldscripts/elf_i386_minix.xbn b/external/gpl3/binutils/ldscripts/elf_i386_minix.xbn index 3ee4cd632..1c967368f 100644 --- a/external/gpl3/binutils/ldscripts/elf_i386_minix.xbn +++ b/external/gpl3/binutils/ldscripts/elf_i386_minix.xbn @@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf32-i386-minix", "elf32-i386-minix", "elf32-i386-minix") OUTPUT_ARCH(i386) ENTRY(_start) -SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); +SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ diff --git a/external/gpl3/binutils/ldscripts/elf_i386_minix.xc b/external/gpl3/binutils/ldscripts/elf_i386_minix.xc index 7367feeec..46a5da35e 100644 --- a/external/gpl3/binutils/ldscripts/elf_i386_minix.xc +++ b/external/gpl3/binutils/ldscripts/elf_i386_minix.xc @@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf32-i386-minix", "elf32-i386-minix", "elf32-i386-minix") OUTPUT_ARCH(i386) ENTRY(_start) -SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); +SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ diff --git a/external/gpl3/binutils/ldscripts/elf_i386_minix.xd b/external/gpl3/binutils/ldscripts/elf_i386_minix.xd index 8769d936e..aa2a871a0 100644 --- a/external/gpl3/binutils/ldscripts/elf_i386_minix.xd +++ b/external/gpl3/binutils/ldscripts/elf_i386_minix.xd @@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf32-i386-minix", "elf32-i386-minix", "elf32-i386-minix") OUTPUT_ARCH(i386) ENTRY(_start) -SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); +SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ diff --git a/external/gpl3/binutils/ldscripts/elf_i386_minix.xdc b/external/gpl3/binutils/ldscripts/elf_i386_minix.xdc index 2301a84f2..6c2a2d257 100644 --- a/external/gpl3/binutils/ldscripts/elf_i386_minix.xdc +++ b/external/gpl3/binutils/ldscripts/elf_i386_minix.xdc @@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf32-i386-minix", "elf32-i386-minix", "elf32-i386-minix") OUTPUT_ARCH(i386) ENTRY(_start) -SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); +SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ diff --git a/external/gpl3/binutils/ldscripts/elf_i386_minix.xdw b/external/gpl3/binutils/ldscripts/elf_i386_minix.xdw index e1c3fb47e..1dcfed94b 100644 --- a/external/gpl3/binutils/ldscripts/elf_i386_minix.xdw +++ b/external/gpl3/binutils/ldscripts/elf_i386_minix.xdw @@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf32-i386-minix", "elf32-i386-minix", "elf32-i386-minix") OUTPUT_ARCH(i386) ENTRY(_start) -SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); +SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ diff --git a/external/gpl3/binutils/ldscripts/elf_i386_minix.xn b/external/gpl3/binutils/ldscripts/elf_i386_minix.xn index 37220dde6..90a648c8d 100644 --- a/external/gpl3/binutils/ldscripts/elf_i386_minix.xn +++ b/external/gpl3/binutils/ldscripts/elf_i386_minix.xn @@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf32-i386-minix", "elf32-i386-minix", "elf32-i386-minix") OUTPUT_ARCH(i386) ENTRY(_start) -SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); +SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ diff --git a/external/gpl3/binutils/ldscripts/elf_i386_minix.xs b/external/gpl3/binutils/ldscripts/elf_i386_minix.xs index 6d47855b1..365fbf19a 100644 --- a/external/gpl3/binutils/ldscripts/elf_i386_minix.xs +++ b/external/gpl3/binutils/ldscripts/elf_i386_minix.xs @@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf32-i386-minix", "elf32-i386-minix", "elf32-i386-minix") OUTPUT_ARCH(i386) ENTRY(_start) -SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); +SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ diff --git a/external/gpl3/binutils/ldscripts/elf_i386_minix.xsc b/external/gpl3/binutils/ldscripts/elf_i386_minix.xsc index bb790caf7..5ea35d141 100644 --- a/external/gpl3/binutils/ldscripts/elf_i386_minix.xsc +++ b/external/gpl3/binutils/ldscripts/elf_i386_minix.xsc @@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf32-i386-minix", "elf32-i386-minix", "elf32-i386-minix") OUTPUT_ARCH(i386) ENTRY(_start) -SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); +SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ diff --git a/external/gpl3/binutils/ldscripts/elf_i386_minix.xsw b/external/gpl3/binutils/ldscripts/elf_i386_minix.xsw index 7e7d5fe5d..eba9e341e 100644 --- a/external/gpl3/binutils/ldscripts/elf_i386_minix.xsw +++ b/external/gpl3/binutils/ldscripts/elf_i386_minix.xsw @@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf32-i386-minix", "elf32-i386-minix", "elf32-i386-minix") OUTPUT_ARCH(i386) ENTRY(_start) -SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); +SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ diff --git a/external/gpl3/binutils/ldscripts/elf_i386_minix.xw b/external/gpl3/binutils/ldscripts/elf_i386_minix.xw index ffd525ae4..f76fe2ab7 100644 --- a/external/gpl3/binutils/ldscripts/elf_i386_minix.xw +++ b/external/gpl3/binutils/ldscripts/elf_i386_minix.xw @@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf32-i386-minix", "elf32-i386-minix", "elf32-i386-minix") OUTPUT_ARCH(i386) ENTRY(_start) -SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); +SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ diff --git a/external/gpl3/binutils/patches/0000-binutils_nbsd.patch b/external/gpl3/binutils/patches/0000-binutils_nbsd.patch index a1edeebf8..235cdb03c 100644 --- a/external/gpl3/binutils/patches/0000-binutils_nbsd.patch +++ b/external/gpl3/binutils/patches/0000-binutils_nbsd.patch @@ -1,286 +1,58 @@ -diff -rNU3 dist/bfd/ChangeLog dist.nbsd/bfd/ChangeLog ---- dist/bfd/ChangeLog Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/ChangeLog Wed Nov 7 11:13:53 2012 -@@ -1,3 +1,13 @@ -+2011-12-11 John Davis Anglin -+ -+ PR binutils/13476 -+ * elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L, -+ R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations to -+ R_PARISC_DPREL21L when not doing a shared link. Likewise convert -+ R_PARISC_TLS_GD14R, R_PARISC_TLS_LDM14R and R_PARISC_TLS_IE14R to -+ R_PARISC_DPREL14R. Handle R_PARISC_TLS_GD21L, R_PARISC_TLS_LDM21L -+ and R_PARISC_TLS_IE21L with R_PARISC_DLTIND21L. -+ - 2011-06-27 Tristan Gingold - - * configure.in: Bump version to 2.21.1 -diff -rNU3 dist/bfd/archive.c dist.nbsd/bfd/archive.c ---- dist/bfd/archive.c Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/archive.c Wed Nov 7 11:13:53 2012 -@@ -156,6 +156,9 @@ - #define ar_maxnamelen(abfd) ((abfd)->xvec->ar_max_namelen) - - #define arch_eltdata(bfd) ((struct areltdata *) ((bfd)->arelt_data)) -+ -+static const char * normalize (bfd *, const char *); -+ - #define arch_hdr(bfd) ((struct ar_hdr *) arch_eltdata (bfd)->arch_header) - - /* True iff NAME designated a BSD 4.4 extended name. */ -@@ -725,7 +728,9 @@ - /* Pad to an even boundary... - Note that last_file->origin can be odd in the case of - BSD-4.4-style element with a long odd size. */ -- filestart += filestart % 2; -+ if (!strncmp(arch_hdr (last_file)->ar_name, "#1/", 3)) -+ size += strlen(normalize(last_file, last_file->filename)); -+ filestart += size % 2; - } - - return _bfd_get_elt_at_filepos (archive, filestart); -@@ -2068,11 +2073,22 @@ - current = current->archive_next) - { - char buffer[DEFAULT_BUFFERSIZE]; -- unsigned int remaining = arelt_size (current); -+ unsigned int saved_size = arelt_size (current); -+ unsigned int remaining = saved_size; -+ struct ar_hdr *hdr = arch_hdr (current); - - /* Write ar header. */ - if (!_bfd_write_ar_hdr (arch, current)) - return FALSE; -+ /* Write filename if it is a 4.4BSD extended file, and add to size. */ -+ if (!strncmp (hdr->ar_name, "#1/", 3)) -+ { -+ const char *normal = normalize (current, current->filename); -+ unsigned int thislen = strlen (normal); -+ if (bfd_write (normal, 1, thislen, arch) != thislen) -+ return FALSE; -+ saved_size += thislen; -+ } - if (bfd_is_thin_archive (arch)) - continue; - if (bfd_seek (current, (file_ptr) 0, SEEK_SET) != 0) -@@ -2343,11 +2359,11 @@ - { - do - { -- struct areltdata *ared = arch_eltdata (current); -- -- firstreal += (ared->parsed_size + ared->extra_size -- + sizeof (struct ar_hdr)); -- firstreal += firstreal % 2; -+ unsigned int size = arelt_size (current); -+ if (!strncmp(arch_hdr (current)->ar_name, "#1/", 3)) -+ size += strlen(normalize(current, current->filename)); -+ firstreal += size + sizeof (struct ar_hdr); -+ firstreal += size % 2; - current = current->archive_next; - } - while (current != map[count].u.abfd); -diff -rNU3 dist/bfd/bfd-in2.h dist.nbsd/bfd/bfd-in2.h ---- dist/bfd/bfd-in2.h Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/bfd-in2.h Wed Nov 7 11:13:53 2012 -@@ -5072,6 +5072,11 @@ - /* This BFD has been created by the linker and doesn't correspond - to any input file. */ - #define BFD_LINKER_CREATED 0x2000 -+ /* This may be set before writing out a BFD to request that it -+ be written using values for UIDs, GIDs, timestamps, etc. that -+ will be consistent from run to run. */ -+#define BFD_DETERMINISTIC_OUTPUT 0x4000 -+ - - /* This may be set before writing out a BFD to request that it - be written using values for UIDs, GIDs, timestamps, etc. that -diff -rNU3 dist/bfd/coff-alpha.c dist.nbsd/bfd/coff-alpha.c ---- dist/bfd/coff-alpha.c Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/coff-alpha.c Wed Nov 7 11:13:53 2012 -@@ -687,7 +687,9 @@ - case ALPHA_R_OP_STORE: - /* The STORE reloc needs the size and offset fields. We store - them in the addend. */ -+#if 0 - BFD_ASSERT (intern->r_offset <= 256); -+#endif - rptr->addend = (intern->r_offset << 8) + intern->r_size; - break; - -diff -rNU3 dist/bfd/config.bfd dist.nbsd/bfd/config.bfd ---- dist/bfd/config.bfd Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/config.bfd Wed Nov 7 11:13:53 2012 -@@ -218,15 +218,15 @@ - - armeb-*-netbsdelf*) - targ_defvec=bfd_elf32_bigarm_vec -- targ_selvecs="bfd_elf32_littlearm_vec armnetbsd_vec" -+ targ_selvecs="bfd_elf32_littlearm_vec armnetbsd_vec armcoff_little_vec armcoff_big_vec" - ;; - arm-*-netbsdelf*) - targ_defvec=bfd_elf32_littlearm_vec -- targ_selvecs="bfd_elf32_bigarm_vec armnetbsd_vec" -+ targ_selvecs="bfd_elf32_bigarm_vec armnetbsd_vec armcoff_little_vec armcoff_big_vec" - ;; - arm-*-netbsd* | arm-*-openbsd*) - targ_defvec=armnetbsd_vec -- targ_selvecs="bfd_elf32_littlearm_vec bfd_elf32_bigarm_vec" -+ targ_selvecs="bfd_elf32_littlearm_vec bfd_elf32_bigarm_vec armcoff_little_vec armcoff_big_vec" - targ_underscore=yes - targ_cflags=-D__QNXTARGET__ - ;; -@@ -832,9 +832,9 @@ - # targ_selvecs=m68kmach3_vec - # targ_cflags=-DSTAT_FOR_EXEC - ;; -- m68*-hp*-netbsd*) -+ m68k4k*-*-netbsd*) - targ_defvec=m68k4knetbsd_vec -- targ_selvecs="m68knetbsd_vec hp300bsd_vec sunos_big_vec" -+ targ_selvecs="m68knetbsd_vec hp300bsd_vec sunos_big_vec bfd_elf32_m68k_vec" - targ_underscore=yes - ;; - m68*-*-netbsdelf*) -@@ -910,6 +910,16 @@ - targ_defvec=ecoff_big_vec - targ_selvecs=ecoff_little_vec - ;; -+#ifdef BFD64 -+ mips64*el-*-netbsd*) -+ targ_defvec=bfd_elf32_ntradlittlemips_vec -+ targ_selvecs="bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec" -+ ;; -+ mips64*-*-netbsd*) -+ targ_defvec=bfd_elf32_ntradbigmips_vec -+ targ_selvecs="bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradlittlemips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec" -+ ;; -+#endif - mips*el-*-netbsd*) - targ_defvec=bfd_elf32_tradlittlemips_vec - targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_little_vec ecoff_big_vec" -@@ -1288,6 +1298,8 @@ - want64=true - ;; - -+#endif -+ - sh*l*-*-netbsdelf*) - targ_defvec=bfd_elf32_shlnbsd_vec - targ_selvecs="bfd_elf32_shnbsd_vec shcoff_vec shlcoff_vec bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec" -@@ -1298,8 +1310,6 @@ - targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec" - want64=true - ;; --#endif -- - sh*-*-netbsdelf*) - targ_defvec=bfd_elf32_shnbsd_vec - targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec" -@@ -1389,11 +1399,11 @@ - ;; - sparc-*-netbsdelf*) - targ_defvec=bfd_elf32_sparc_vec -- targ_selvecs=sparcnetbsd_vec -+ targ_selvecs="sparcnetbsd_vec sunos_big_vec" - ;; -- sparc-*-netbsdaout* | sparc-*-netbsd*) -+ sparc-*-netbsd*) - targ_defvec=sparcnetbsd_vec -- targ_selvecs=bfd_elf32_sparc_vec -+ targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec" +diff -rNU3 dist.orig/bfd/config.bfd dist.nbsd/bfd/config.bfd +--- dist.orig/bfd/config.bfd 2011-07-29 00:35:13.000000000 +0200 ++++ dist.nbsd/bfd/config.bfd 2013-04-08 23:50:35.000000000 +0200 +@@ -523,7 +523,7 @@ + targ_selvecs=i386bsd_vec targ_underscore=yes ;; - sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]) -@@ -1440,6 +1450,10 @@ - targ_defvec=bfd_elf64_sparc_vec - targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec" - want64=true -+ ;; -+ sparc64-*-netbsd*) -+ targ_defvec=bfd_elf64_sparc_vec -+ targ_selvecs="bfd_elf32_sparc_vec sparcnetbsd_vec sunos_big_vec" - ;; - sparc64-*-elf* | sparc64-*-rtems* ) - targ_defvec=bfd_elf64_sparc_vec -diff -rNU3 dist/bfd/configure dist.nbsd/bfd/configure ---- dist/bfd/configure Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/configure Wed Nov 7 11:13:54 2012 -@@ -12109,10 +12109,10 @@ - withval=$with_pkgversion; case "$withval" in - yes) as_fn_error "package version not specified" "$LINENO" 5 ;; - no) PKGVERSION= ;; -- *) PKGVERSION="($withval) " ;; -+ *) PKGVERSION="($withval)\ " ;; - esac - else -- PKGVERSION="(GNU Binutils) " -+ PKGVERSION="(GNU Binutils)\ " - - fi - -@@ -13850,6 +13850,7 @@ - COREFILE=netbsd-core.lo - ;; - arm-*-riscix) COREFILE=trad-core.lo ;; -+ arm*-*-netbsd*) COREFILE=netbsd-core.lo ;; - hppa*-*-hpux*) COREFILE=hpux-core.lo ;; - hppa*-*-hiux*) COREFILE=hpux-core.lo ;; - hppa*-*-mpeix*) COREFILE=hpux-core.lo ;; -@@ -13912,7 +13913,7 @@ - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/i860mach3.h"' - ;; -- mips-*-netbsd* | mips*-*-openbsd*) -+ mips*-*-netbsd* | mips*-*-openbsd*) - COREFILE=netbsd-core.lo - ;; - mips-dec-*) -diff -rNU3 dist/bfd/configure.host dist.nbsd/bfd/configure.host ---- dist/bfd/configure.host Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/configure.host Wed Nov 7 11:13:53 2012 -@@ -56,6 +56,18 @@ - - m68*-hp-hpux*) HDEFINES=-DHOST_HP300HPUX ;; - -+sparc64*-*-netbsd*) host64=true; HOST_64BIT_TYPE=long ;; -+ -+x86_64*-*-netbsd*) host64=true; HOST_64BIT_TYPE=long ;; -+ -+*-*-aix*) HOST_64BIT_TYPE="long long" -+ HOST_U_64BIT_TYPE="unsigned long long" -+ ;; -+ -+*-*-solaris*) HOST_64BIT_TYPE="long long" -+ HOST_U_64BIT_TYPE="unsigned long long" -+ ;; -+ - # Some Solaris systems (osol0906 at least) have a libc that doesn't recognise - # the "MS-ANSI" code page name, so we define an override for CP_ACP (sets the - # default code page used by windres/windmc when not specified by a commandline -diff -rNU3 dist/bfd/configure.in dist.nbsd/bfd/configure.in ---- dist/bfd/configure.in Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/configure.in Wed Nov 7 11:13:53 2012 -@@ -242,6 +242,7 @@ - COREFILE=netbsd-core.lo - ;; - arm-*-riscix) COREFILE=trad-core.lo ;; -+ arm*-*-netbsd*) COREFILE=netbsd-core.lo ;; - hppa*-*-hpux*) COREFILE=hpux-core.lo ;; - hppa*-*-hiux*) COREFILE=hpux-core.lo ;; - hppa*-*-mpeix*) COREFILE=hpux-core.lo ;; -@@ -328,7 +329,7 @@ - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/i860mach3.h"' - ;; -- mips-*-netbsd* | mips*-*-openbsd*) -+ mips*-*-netbsd* | mips*-*-openbsd*) - COREFILE=netbsd-core.lo - ;; - mips-dec-*) -diff -rNU3 dist/bfd/doc/Makefile.in dist.nbsd/bfd/doc/Makefile.in ---- dist/bfd/doc/Makefile.in Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/doc/Makefile.in Wed Nov 7 11:13:53 2012 +- i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu) ++ i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu | i[3-7]86-*-dragonfly*) + targ_defvec=bfd_elf32_i386_freebsd_vec + targ_selvecs="bfd_elf32_i386_vec i386pei_vec i386coff_vec" + targ64_selvecs="bfd_elf64_x86_64_freebsd_vec bfd_elf64_x86_64_vec x86_64pei_vec bfd_elf64_l1om_vec bfd_elf64_l1om_freebsd_vec bfd_elf64_k1om_vec bfd_elf64_k1om_freebsd_vec" +diff -rNU3 dist.orig/bfd/configure dist.nbsd/bfd/configure +--- dist.orig/bfd/configure 2011-11-21 12:55:48.000000000 +0100 ++++ dist.nbsd/bfd/configure 2013-04-08 23:52:18.000000000 +0200 +@@ -15210,6 +15210,7 @@ + bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; + bfd_elf32_i386_sol2_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; + bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; ++ bfd_elf32_i386_dragonfly_vec) tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;; + bfd_elf32_i386_nacl_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; + bfd_elf32_i386_vxworks_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; + bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; +@@ -15374,6 +15375,7 @@ + x86_64coff_vec) tb="$tb coff-x86_64.lo cofflink.lo"; target_size=64 ;; + i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;; + i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;; ++ i386dragonfly_vec) tb="$tb i386freebsd.lo aout32.lo" ;; + i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;; + i386lynx_aout_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;; + i386lynx_coff_vec) tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;; +@@ -16517,6 +16519,8 @@ + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ++ : Avoid regenerating within pkgsrc ++ exit 0 + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; +diff -rNU3 dist.orig/bfd/configure.in dist.nbsd/bfd/configure.in +--- dist.orig/bfd/configure.in 2011-11-21 12:55:46.000000000 +0100 ++++ dist.nbsd/bfd/configure.in 2013-04-08 23:50:41.000000000 +0200 +@@ -644,7 +644,7 @@ + tb= + + elf="elf.lo elflink.lo elf-attrs.lo elf-strtab.lo +- elf-eh-frame.lo dwarf1.lo" ++ elf-eh-frame.lo dwarf1.lo elf-ifunc.lo" + + for vec in $selvecs + do +diff -rNU3 dist.orig/bfd/doc/Makefile.in dist.nbsd/bfd/doc/Makefile.in +--- dist.orig/bfd/doc/Makefile.in 2011-11-21 12:55:49.000000000 +0100 ++++ dist.nbsd/bfd/doc/Makefile.in 2013-04-09 08:17:18.000000000 +0200 @@ -417,7 +417,9 @@ clean-libtool: -rm -rf .libs _libs @@ -292,4450 +64,317 @@ diff -rNU3 dist/bfd/doc/Makefile.in dist.nbsd/bfd/doc/Makefile.in restore=: && backupdir="$(am__leading_dot)am$$$$" && \ rm -rf $$backupdir && mkdir $$backupdir && \ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ -diff -rNU3 dist/bfd/doc/bfdver.texi dist.nbsd/bfd/doc/bfdver.texi ---- dist/bfd/doc/bfdver.texi Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/doc/bfdver.texi Wed Nov 7 11:13:53 2012 +diff -rNU3 dist.orig/bfd/doc/bfdver.texi dist.nbsd/bfd/doc/bfdver.texi +--- dist.orig/bfd/doc/bfdver.texi 2011-11-21 12:58:21.000000000 +0100 ++++ dist.nbsd/bfd/doc/bfdver.texi 2013-04-09 08:03:49.000000000 +0200 @@ -1,4 +1,4 @@ - @set VERSION 2.21.1 + @set VERSION 2.22 -@set VERSION_PACKAGE (GNU Binutils) --@set UPDATED June 2011 +@set VERSION_PACKAGE (GNU Binutils)\ -+@set UPDATED September 2011 + @set UPDATED November 2011 @set BUGURL @uref{http://www.sourceware.org/bugzilla/} -diff -rNU3 dist/bfd/doc/reloc.texi dist.nbsd/bfd/doc/reloc.texi ---- dist/bfd/doc/reloc.texi Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/doc/reloc.texi Wed Nov 7 11:13:53 2012 -@@ -570,6 +570,12 @@ - @deffnx {} BFD_RELOC_68K_TLS_LE8 - Relocations used by 68K ELF. - @end deffn -+@deffn {} BFD_RELOC_VAX_GLOB_DAT -+@deffnx {} BFD_RELOC_VAX_GLOB_REF -+@deffnx {} BFD_RELOC_VAX_JMP_SLOT -+@deffnx {} BFD_RELOC_VAX_RELATIVE -+Relocations used by VAX ELF. -+@end deffn - @deffn {} BFD_RELOC_32_BASEREL - @deffnx {} BFD_RELOC_16_BASEREL - @deffnx {} BFD_RELOC_LO16_BASEREL -diff -rNU3 dist/bfd/elf.c dist.nbsd/bfd/elf.c ---- dist/bfd/elf.c Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/elf.c Wed Nov 7 11:13:53 2012 -@@ -8502,6 +8502,23 @@ - return TRUE; - } - -+ /* On SuperH, PT_GETREGS == mach+3 and PT_GETFPREGS == mach+5. -+ There's also old PT___GETREGS40 == mach + 1 for old reg -+ structure which lacks GBR. */ -+ -+ case bfd_arch_sh: -+ switch (note->type) -+ { -+ case NT_NETBSDCORE_FIRSTMACH+3: -+ return elfcore_make_note_pseudosection (abfd, ".reg", note); -+ -+ case NT_NETBSDCORE_FIRSTMACH+5: -+ return elfcore_make_note_pseudosection (abfd, ".reg2", note); -+ -+ default: -+ return TRUE; -+ } -+ - /* On all other arch's, PT_GETREGS == mach+1 and - PT_GETFPREGS == mach+3. */ - -diff -rNU3 dist/bfd/elf32-arm.c dist.nbsd/bfd/elf32-arm.c ---- dist/bfd/elf32-arm.c Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/elf32-arm.c Wed Nov 7 11:13:53 2012 -@@ -11783,6 +11783,10 @@ - { - struct bfd_link_info *info = (struct bfd_link_info *) inf; - -+ if (info->warn_shared_textrel) -+ (*_bfd_error_handler) -+ (_("warning: dynamic relocation in readonly section `%s'"), -+ h->root.root.string); - info->flags |= DF_TEXTREL; - - /* Not an error, just cut short the traversal. */ -diff -rNU3 dist/bfd/elf32-hppa.c dist.nbsd/bfd/elf32-hppa.c ---- dist/bfd/elf32-hppa.c Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/elf32-hppa.c Wed Nov 7 11:13:53 2012 -@@ -2201,6 +2201,10 @@ - { - struct bfd_link_info *info = inf; - -+ if (info->warn_shared_textrel) -+ (*_bfd_error_handler) -+ (_("warning: dynamic relocation in readonly section `%s'"), -+ eh->root.root.string); - info->flags |= DF_TEXTREL; - - /* Not an error, just cut short the traversal. */ -@@ -3352,10 +3356,16 @@ - switch (r_type) - { - case R_PARISC_DLTIND21L: -+ case R_PARISC_TLS_GD21L: -+ case R_PARISC_TLS_LDM21L: -+ case R_PARISC_TLS_IE21L: - r_type = R_PARISC_DPREL21L; - break; - - case R_PARISC_DLTIND14R: -+ case R_PARISC_TLS_GD14R: -+ case R_PARISC_TLS_LDM14R: -+ case R_PARISC_TLS_IE14R: - r_type = R_PARISC_DPREL14R; - break; - -@@ -3421,53 +3431,48 @@ - case R_PARISC_DPREL21L: - case R_PARISC_DPREL14R: - case R_PARISC_DPREL14F: -- case R_PARISC_TLS_GD21L: -- case R_PARISC_TLS_LDM21L: -- case R_PARISC_TLS_IE21L: - /* Convert instructions that use the linkage table pointer (r19) to - instructions that use the global data pointer (dp). This is the - most efficient way of using PIC code in an incomplete executable, - but the user must follow the standard runtime conventions for - accessing data for this to work. */ -- if (orig_r_type == R_PARISC_DLTIND21L -- || (!info->shared -- && (r_type == R_PARISC_TLS_GD21L -- || r_type == R_PARISC_TLS_LDM21L -- || r_type == R_PARISC_TLS_IE21L))) -+ if (orig_r_type != r_type) - { -- /* Convert addil instructions if the original reloc was a -- DLTIND21L. GCC sometimes uses a register other than r19 for -- the operation, so we must convert any addil instruction -- that uses this relocation. */ -- if ((insn & 0xfc000000) == ((int) OP_ADDIL << 26)) -- insn = ADDIL_DP; -- else -- /* We must have a ldil instruction. It's too hard to find -- and convert the associated add instruction, so issue an -- error. */ -- (*_bfd_error_handler) -- (_("%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"), -- input_bfd, -- input_section, -- (long) offset, -- howto->name, -- insn); -+ if (r_type == R_PARISC_DPREL21L) -+ { -+ /* GCC sometimes uses a register other than r19 for the -+ operation, so we must convert any addil instruction -+ that uses this relocation. */ -+ if ((insn & 0xfc000000) == ((int) OP_ADDIL << 26)) -+ insn = ADDIL_DP; -+ else -+ /* We must have a ldil instruction. It's too hard to find -+ and convert the associated add instruction, so issue an -+ error. */ -+ (*_bfd_error_handler) -+ (_("%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"), -+ input_bfd, -+ input_section, -+ (long) offset, -+ howto->name, -+ insn); -+ } -+ else if (r_type == R_PARISC_DPREL14F) -+ { -+ /* This must be a format 1 load/store. Change the base -+ register to dp. */ -+ insn = (insn & 0xfc1ffff) | (27 << 21); -+ } - } -- else if (orig_r_type == R_PARISC_DLTIND14F) -- { -- /* This must be a format 1 load/store. Change the base -- register to dp. */ -- insn = (insn & 0xfc1ffff) | (27 << 21); -- } - -- /* For all the DP relative relocations, we need to examine the symbol's -- section. If it has no section or if it's a code section, then -- "data pointer relative" makes no sense. In that case we don't -- adjust the "value", and for 21 bit addil instructions, we change the -- source addend register from %dp to %r0. This situation commonly -- arises for undefined weak symbols and when a variable's "constness" -- is declared differently from the way the variable is defined. For -- instance: "extern int foo" with foo defined as "const int foo". */ -+ /* For all the DP relative relocations, we need to examine the symbol's -+ section. If it has no section or if it's a code section, then -+ "data pointer relative" makes no sense. In that case we don't -+ adjust the "value", and for 21 bit addil instructions, we change the -+ source addend register from %dp to %r0. This situation commonly -+ arises for undefined weak symbols and when a variable's "constness" -+ is declared differently from the way the variable is defined. For -+ instance: "extern int foo" with foo defined as "const int foo". */ - if (sym_sec == NULL || (sym_sec->flags & SEC_CODE) != 0) - { - if ((insn & ((0x3f << 26) | (0x1f << 21))) -@@ -3484,6 +3489,9 @@ - case R_PARISC_DLTIND21L: - case R_PARISC_DLTIND14R: - case R_PARISC_DLTIND14F: -+ case R_PARISC_TLS_GD21L: -+ case R_PARISC_TLS_LDM21L: -+ case R_PARISC_TLS_IE21L: - case R_PARISC_TLS_GD14R: - case R_PARISC_TLS_LDM14R: - case R_PARISC_TLS_IE14R: -diff -rNU3 dist/bfd/elf32-i386.c dist.nbsd/bfd/elf32-i386.c ---- dist/bfd/elf32-i386.c Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/elf32-i386.c Wed Nov 7 11:13:53 2012 -@@ -515,7 +515,7 @@ - /* The name of the dynamic interpreter. This is put in the .interp - section. */ - --#define ELF_DYNAMIC_INTERPRETER "/usr/lib/libc.so.1" -+#define ELF_DYNAMIC_INTERPRETER "/libexec/ld.elf_so" - - /* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid - copying dynamic variables from a shared lib into an app's dynbss -@@ -2391,7 +2391,10 @@ - if (s != NULL && (s->flags & SEC_READONLY) != 0) - { - struct bfd_link_info *info = (struct bfd_link_info *) inf; -- -+ if (info->warn_shared_textrel) -+ (*_bfd_error_handler) -+ (_("warning: dynamic relocation in readonly section `%s'"), -+ h->root.root.string); - info->flags |= DF_TEXTREL; - - /* Not an error, just cut short the traversal. */ -diff -rNU3 dist/bfd/elf32-m68k.c dist.nbsd/bfd/elf32-m68k.c ---- dist/bfd/elf32-m68k.c Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/elf32-m68k.c Wed Nov 7 11:13:54 2012 -@@ -2567,7 +2567,7 @@ - if (ind->got_entry_key != 0) - { - BFD_ASSERT (dir->got_entry_key == 0); -- /* Assert that GOTs aren't partioned yet. */ -+ /* Assert that GOTs aren't partitioned yet. */ - BFD_ASSERT (ind->glist == NULL); - - dir->got_entry_key = ind->got_entry_key; -diff -rNU3 dist/bfd/elf32-ppc.c dist.nbsd/bfd/elf32-ppc.c ---- dist/bfd/elf32-ppc.c Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/elf32-ppc.c Wed Nov 7 11:13:53 2012 -@@ -3506,7 +3506,7 @@ - sec->has_tls_get_addr_call = 1; - } - -- switch (r_type) -+ switch ((int)r_type) - { - case R_PPC_TLSGD: - case R_PPC_TLSLD: -@@ -7219,7 +7219,7 @@ - howto = NULL; - if (r_type < R_PPC_max) - howto = ppc_elf_howto_table[r_type]; -- switch (r_type) -+ switch ((int)r_type) - { - default: - (*_bfd_error_handler) -diff -rNU3 dist/bfd/elf32-sh.c dist.nbsd/bfd/elf32-sh.c ---- dist/bfd/elf32-sh.c Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/elf32-sh.c Wed Nov 7 11:13:53 2012 -@@ -3333,6 +3333,10 @@ - { - struct bfd_link_info *info = (struct bfd_link_info *) inf; - -+ if (info->warn_shared_textrel) -+ (*_bfd_error_handler) -+ (_("warning: dynamic relocation in readonly section `%s'"), -+ h->root.root.string); - info->flags |= DF_TEXTREL; - - /* Not an error, just cut short the traversal. */ -diff -rNU3 dist/bfd/elf32-vax.c dist.nbsd/bfd/elf32-vax.c ---- dist/bfd/elf32-vax.c Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/elf32-vax.c Wed Nov 7 11:13:54 2012 -@@ -52,7 +52,7 @@ - - static bfd_boolean elf32_vax_set_private_flags (bfd *, flagword); - static bfd_boolean elf32_vax_merge_private_bfd_data (bfd *, bfd *); --static bfd_boolean elf32_vax_print_private_bfd_data (bfd *, PTR); -+static bfd_boolean elf32_vax_print_private_bfd_data (bfd *, void *); - - static reloc_howto_type howto_table[] = { - HOWTO (R_VAX_NONE, /* type */ -@@ -422,7 +422,7 @@ - #define elf_vax_link_hash_traverse(table, func, info) \ - (elf_link_hash_traverse \ - ((table), \ -- (bfd_boolean (*) (struct elf_link_hash_entry *, PTR)) (func), \ -+ (bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func), \ - (info))) - - /* Create an entry in an VAX ELF linker hash table. */ -@@ -489,6 +489,24 @@ - return TRUE; - } - -+/* Copy vax-specific data from one module to another */ -+static bfd_boolean -+elf32_vax_copy_private_bfd_data (bfd *ibfd, bfd *obfd) -+{ -+ flagword in_flags; -+ -+ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour -+ || bfd_get_flavour (obfd) != bfd_target_elf_flavour) -+ return TRUE; -+ -+ in_flags = elf_elfheader (ibfd)->e_flags; -+ -+ elf_elfheader (obfd)->e_flags = in_flags; -+ elf_flags_init (obfd) = TRUE; -+ -+ return TRUE; -+} -+ - /* Merge backend specific data from an object file to the output - object file when linking. */ - static bfd_boolean -@@ -513,7 +531,7 @@ - - /* Display the flags field */ - static bfd_boolean --elf32_vax_print_private_bfd_data (bfd *abfd, PTR ptr) -+elf32_vax_print_private_bfd_data (bfd *abfd, void * ptr) - { - FILE *file = (FILE *) ptr; - -@@ -622,14 +640,13 @@ - srelgot = bfd_get_section_by_name (dynobj, ".rela.got"); - if (srelgot == NULL) - { -+ flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS -+ | SEC_IN_MEMORY | SEC_LINKER_CREATED -+ | SEC_READONLY); -+ - srelgot = bfd_make_section_with_flags (dynobj, - ".rela.got", -- (SEC_ALLOC -- | SEC_LOAD -- | SEC_HAS_CONTENTS -- | SEC_IN_MEMORY -- | SEC_LINKER_CREATED -- | SEC_READONLY)); -+ flags); - if (srelgot == NULL - || !bfd_set_section_alignment (dynobj, srelgot, 2)) - return FALSE; -@@ -752,7 +769,13 @@ - return FALSE; - - if (sec->flags & SEC_READONLY) -- info->flags |= DF_TEXTREL; -+ { -+ if (info->warn_shared_textrel) -+ (*_bfd_error_handler) -+ (_("warning: dynamic relocation in readonly section `%s'"), -+ sec->name); -+ info->flags |= DF_TEXTREL; -+ } - } - - sreloc->size += sizeof (Elf32_External_Rela); -@@ -933,39 +956,21 @@ - if (h->type == STT_FUNC - || h->needs_plt) - { -- if (! info->shared -- && !h->def_dynamic -- && !h->ref_dynamic -- /* We must always create the plt entry if it was referenced -- by a PLTxxO relocation. In this case we already recorded -- it as a dynamic symbol. */ -- && h->dynindx == -1) -+ if (h->plt.refcount <= 0 -+ || SYMBOL_CALLS_LOCAL (info, h) -+ || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT -+ && h->root.type == bfd_link_hash_undefweak)) - { - /* This case can occur if we saw a PLTxx reloc in an input - file, but the symbol was never referred to by a dynamic -- object. In such a case, we don't actually need to build -- a procedure linkage table, and we can just do a PCxx -- reloc instead. */ -- BFD_ASSERT (h->needs_plt); -+ object, or if all references were garbage collected. In -+ such a case, we don't actually need to build a procedure -+ linkage table, and we can just do a PCxx reloc instead. */ - h->plt.offset = (bfd_vma) -1; -- return TRUE; -- } -- -- /* GC may have rendered this entry unused. */ -- if (h->plt.refcount <= 0) -- { - h->needs_plt = 0; -- h->plt.offset = (bfd_vma) -1; - return TRUE; - } - -- /* Make sure this symbol is output as a dynamic symbol. */ -- if (h->dynindx == -1) -- { -- if (! bfd_elf_link_record_dynamic_symbol (info, h)) -- return FALSE; -- } -- - s = bfd_get_section_by_name (dynobj, ".plt"); - BFD_ASSERT (s != NULL); - -@@ -1035,13 +1040,6 @@ - if (info->shared) - return TRUE; - -- if (h->size == 0) -- { -- (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"), -- h->root.root.string); -- return TRUE; -- } -- - /* We must allocate the symbol in our .dynbss section, which will - become part of the .bss section of the executable. There will be - an entry for this symbol in the .dynsym section. The dynamic -@@ -1059,7 +1057,7 @@ - copy the initial value out of the dynamic object and into the - runtime process image. We need to remember the offset into the - .rela.bss section we are going to use. */ -- if ((h->root.u.def.section->flags & SEC_ALLOC) != 0) -+ if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0) - { - asection *srel; - -@@ -1129,7 +1127,7 @@ - instantiate (allocate space for them). */ - elf_link_hash_traverse (elf_hash_table (info), - elf_vax_instantiate_got_entries, -- (PTR) info); -+ info); - - /* The check_relocs and adjust_dynamic_symbol entry points have - determined the sizes of the various dynamic sections. Allocate -@@ -1211,7 +1209,12 @@ - continue; - - /* Allocate memory for the section contents. */ -- s->contents = (bfd_byte *) bfd_alloc (dynobj, s->size); -+ /* FIXME: This should be a call to bfd_alloc not bfd_zalloc. -+ Unused entries should be reclaimed before the section's contents -+ are written out, but at the moment this does not happen. Thus in -+ order to prevent writing out garbage, we initialise the section's -+ contents to zero. */ -+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); - if (s->contents == NULL) - return FALSE; - } -@@ -1268,7 +1271,7 @@ - - static bfd_boolean - elf_vax_discard_copies (struct elf_vax_link_hash_entry *h, -- PTR ignore ATTRIBUTE_UNUSED) -+ void * ignore ATTRIBUTE_UNUSED) - { - struct elf_vax_pcrel_relocs_copied *s; - -@@ -1659,9 +1662,9 @@ - { - relocate = TRUE; - outrel.r_info = ELF32_R_INFO (0, R_VAX_RELATIVE); -- BFD_ASSERT (bfd_get_signed_32 (input_bfd, -- &contents[rel->r_offset]) == 0); -- outrel.r_addend = relocation + rel->r_addend; -+ outrel.r_addend = bfd_get_signed_32(input_bfd, -+ &contents[rel->r_offset]) -+ + relocation + rel->r_addend; - } - else - { -@@ -1700,14 +1703,15 @@ - } - } - -- if (!strcmp (bfd_get_section_name (input_bfd, input_section), -- ".text") != 0 || -- (info->shared -- && ELF32_R_TYPE(outrel.r_info) != R_VAX_32 -- && ELF32_R_TYPE(outrel.r_info) != R_VAX_RELATIVE -- && ELF32_R_TYPE(outrel.r_info) != R_VAX_COPY -- && ELF32_R_TYPE(outrel.r_info) != R_VAX_JMP_SLOT -- && ELF32_R_TYPE(outrel.r_info) != R_VAX_GLOB_DAT)) -+ if (input_section->flags & SEC_READONLY) -+ info->flags |= DF_TEXTREL; -+ -+ if ((input_section->flags & SEC_READONLY) != 0 -+ || (ELF32_R_TYPE (outrel.r_info) != R_VAX_32 -+ && ELF32_R_TYPE (outrel.r_info) != R_VAX_RELATIVE -+ && ELF32_R_TYPE (outrel.r_info) != R_VAX_COPY -+ && ELF32_R_TYPE (outrel.r_info) != R_VAX_JMP_SLOT -+ && ELF32_R_TYPE (outrel.r_info) != R_VAX_GLOB_DAT)) - { - if (h != NULL) - (*_bfd_error_handler) -@@ -2082,12 +2086,15 @@ - #define TARGET_LITTLE_SYM bfd_elf32_vax_vec - #define TARGET_LITTLE_NAME "elf32-vax" - #define ELF_MACHINE_CODE EM_VAX --#define ELF_MAXPAGESIZE 0x1000 -+#define ELF_MAXPAGESIZE 0x10000 - - #define elf_backend_create_dynamic_sections \ - _bfd_elf_create_dynamic_sections - #define bfd_elf32_bfd_link_hash_table_create \ - elf_vax_link_hash_table_create -+#define bfd_elf32_bfd_copy_private_bfd_data \ -+ elf32_vax_copy_private_bfd_data -+ - #define bfd_elf32_bfd_final_link bfd_elf_gc_common_final_link - - #define elf_backend_check_relocs elf_vax_check_relocs -diff -rNU3 dist/bfd/elf64-alpha.c dist.nbsd/bfd/elf64-alpha.c ---- dist/bfd/elf64-alpha.c Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/elf64-alpha.c Wed Nov 7 11:13:53 2012 -@@ -99,6 +99,11 @@ - #define PLT_ENTRY_SIZE \ - (elf64_alpha_use_secureplt ? NEW_PLT_ENTRY_SIZE : OLD_PLT_ENTRY_SIZE) - -+/* ld --traditional-format uses this older format instead. */ -+#define OLD_PLT_ENTRY_WORD1 0x279f0000 /* ldah $28, 0($31) */ -+#define OLD_PLT_ENTRY_WORD2 0x239c0000 /* lda $28, 0($28) */ -+#define OLD_PLT_ENTRY_WORD3 0xc3e00000 /* br $31, plt0 */ -+ - #define MAX_GOT_SIZE (64*1024) - - #define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so" -@@ -4726,6 +4731,32 @@ - - plt_index = ((gotent->plt_offset - NEW_PLT_HEADER_SIZE) - / NEW_PLT_ENTRY_SIZE); -+ } -+ else if ((output_bfd->flags & BFD_TRADITIONAL_FORMAT) != 0) -+ { -+ long hi, lo; -+ -+ /* decompose the reloc offset for the plt for ldah+lda */ -+ hi = plt_index * sizeof(Elf64_External_Rela); -+ lo = ((hi & 0xffff) ^ 0x8000) - 0x8000; -+ hi = (hi - lo) >> 16; -+ -+ insn = INSN_ABO (INSN_LDAH, 28, 31, hi); -+ bfd_put_32 (output_bfd, insn, -+ splt->contents + gotent->plt_offset); -+ -+ insn = INSN_ABO (INSN_LDA, 28, 28, lo); -+ bfd_put_32 (output_bfd, insn, -+ splt->contents + gotent->plt_offset + 4); -+ -+ disp = -(gotent->plt_offset + 12); -+ insn = INSN_AD (INSN_BR, 31, disp); -+ -+ bfd_put_32 (output_bfd, insn, -+ splt->contents + gotent->plt_offset + 8); -+ -+ plt_index = ((gotent->plt_offset - OLD_PLT_HEADER_SIZE) -+ / OLD_PLT_ENTRY_SIZE); - } - else - { -diff -rNU3 dist/bfd/elf64-mips.c dist.nbsd/bfd/elf64-mips.c ---- dist/bfd/elf64-mips.c Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/elf64-mips.c Wed Nov 7 11:13:54 2012 -@@ -123,6 +123,8 @@ - (bfd *, asymbol *, bfd_boolean, char **, bfd_vma *); - static bfd_boolean mips_elf64_object_p - (bfd *); -+static bfd_boolean mips_elf64_is_local_label_name -+ (bfd *, const char *); - static irix_compat_t elf64_mips_irix_compat - (bfd *); - static bfd_boolean elf64_mips_grok_prstatus -@@ -3052,7 +3054,18 @@ - bfd_default_set_arch_mach (abfd, bfd_arch_mips, mach); - return TRUE; - } -+ -+/* MIPS ELF local labels start with "$L". */ -+static bfd_boolean -+mips_elf64_is_local_label_name (bfd *abfd, const char *name) -+{ -+ if (name[0] == '$' && name[1] == 'L') -+ return TRUE; - -+ /* We accept the generic ELF local label syntax as well. */ -+ return _bfd_elf_is_local_label_name (abfd, name); -+} -+ - /* Depending on the target vector we generate some version of Irix - executables or "normal" MIPS ELF ABI executables. */ - static irix_compat_t -@@ -3276,9 +3289,8 @@ - - #define elf_backend_write_section _bfd_mips_elf_write_section - --/* We don't set bfd_elf64_bfd_is_local_label_name because the 32-bit -- MIPS-specific function only applies to IRIX5, which had no 64-bit -- ABI. */ -+#define bfd_elf64_bfd_is_local_label_name \ -+ mips_elf64_is_local_label_name - #define bfd_elf64_find_nearest_line _bfd_mips_elf_find_nearest_line - #define bfd_elf64_find_inliner_info _bfd_mips_elf_find_inliner_info - #define bfd_elf64_new_section_hook _bfd_mips_elf_new_section_hook -diff -rNU3 dist/bfd/elf64-ppc.c dist.nbsd/bfd/elf64-ppc.c ---- dist/bfd/elf64-ppc.c Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/elf64-ppc.c Wed Nov 7 11:13:53 2012 -@@ -8877,6 +8877,10 @@ - { - struct bfd_link_info *info = inf; - -+ if (info->warn_shared_textrel) -+ (*_bfd_error_handler) -+ (_("warning: dynamic relocation in readonly section `%s'"), -+ h->root.root.string); - info->flags |= DF_TEXTREL; - - /* Not an error, just cut short the traversal. */ -diff -rNU3 dist/bfd/elf64-x86-64.c dist.nbsd/bfd/elf64-x86-64.c ---- dist/bfd/elf64-x86-64.c Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/elf64-x86-64.c Wed Nov 7 11:13:53 2012 -@@ -2196,6 +2196,10 @@ - { - struct bfd_link_info *info = (struct bfd_link_info *) inf; - -+ if (info->warn_shared_textrel) -+ (*_bfd_error_handler) -+ (_("warning: dynamic relocation in readonly section `%s'"), -+ h->root.root.string); - info->flags |= DF_TEXTREL; - - /* Not an error, just cut short the traversal. */ -diff -rNU3 dist/bfd/elflink.c dist.nbsd/bfd/elflink.c ---- dist/bfd/elflink.c Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/elflink.c Wed Nov 7 11:13:53 2012 -@@ -10047,7 +10047,14 @@ - if (bed->s->arch_size == 32) - irel[0].r_info = ELF32_R_INFO (indx, howto->type); - else -- irel[0].r_info = ELF64_R_INFO (indx, howto->type); -+#ifdef BFD64 -+ { -+ bfd_uint64_t indx64 = indx; -+ irel[0].r_info = ELF64_R_INFO (indx64, howto->type); -+ } -+#else -+ BFD_FAIL(); -+#endif - - rel_hdr = reldata->hdr; - erel = rel_hdr->contents; -diff -rNU3 dist/bfd/elfn32-mips.c dist.nbsd/bfd/elfn32-mips.c ---- dist/bfd/elfn32-mips.c Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/elfn32-mips.c Wed Nov 7 11:13:53 2012 -@@ -81,6 +81,8 @@ - (bfd *, Elf_Internal_Note *); - static bfd_boolean elf32_mips_grok_psinfo - (bfd *, Elf_Internal_Note *); -+static bfd_boolean mips_elf_n32_is_local_label_name -+ (bfd *, const char *); - static irix_compat_t elf_n32_mips_irix_compat - (bfd *); - -@@ -2376,6 +2378,17 @@ - return TRUE; - } - -+/* MIPS ELF local labels start with "$L". */ -+static bfd_boolean -+mips_elf_n32_is_local_label_name (bfd *abfd, const char *name) -+{ -+ if (name[0] == '$' && name[1] == 'L') -+ return TRUE; -+ -+ /* We accept the generic ELF local label syntax as well. */ -+ return _bfd_elf_is_local_label_name (abfd, name); -+} -+ - /* Depending on the target vector we generate some version of Irix - executables or "normal" MIPS ELF ABI executables. */ - static irix_compat_t -@@ -2499,6 +2512,8 @@ - #define elf_backend_write_section _bfd_mips_elf_write_section - #define elf_backend_mips_irix_compat elf_n32_mips_irix_compat - #define elf_backend_mips_rtype_to_howto mips_elf_n32_rtype_to_howto -+#define bfd_elf32_bfd_is_local_label_name \ -+ mips_elf_n32_is_local_label_name - #define bfd_elf32_find_nearest_line _bfd_mips_elf_find_nearest_line - #define bfd_elf32_find_inliner_info _bfd_mips_elf_find_inliner_info - #define bfd_elf32_new_section_hook _bfd_mips_elf_new_section_hook -diff -rNU3 dist/bfd/elfxx-mips.c dist.nbsd/bfd/elfxx-mips.c ---- dist/bfd/elfxx-mips.c Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/elfxx-mips.c Wed Nov 7 11:13:53 2012 -@@ -5138,7 +5138,10 @@ - || ((r_type == R_MIPS_26 || r_type == R_MIPS_JALR) - && target_is_16_bit_code_p)); - -- local_p = h == NULL || SYMBOL_REFERENCES_LOCAL (info, &h->root); -+ local_p = h == NULL -+ || (h->got_only_for_calls -+ ? SYMBOL_CALLS_LOCAL (info, &h->root) -+ : SYMBOL_REFERENCES_LOCAL (info, &h->root)); - - gp0 = _bfd_get_gp_value (input_bfd); - gp = _bfd_get_gp_value (abfd); -@@ -7813,10 +7816,24 @@ - reloc types into the output file as R_MIPS_REL32 - relocs. Make room for this reloc in .rel(a).dyn. */ - mips_elf_allocate_dynamic_relocations (dynobj, info, 1); -- if (MIPS_ELF_READONLY_SECTION (sec)) -- /* We tell the dynamic linker that there are -- relocations against the text segment. */ -- info->flags |= DF_TEXTREL; -+ /* In the N32 and 64-bit ABIs there may be multiple -+ consecutive relocations for the same offset. If we have -+ a R_MIPS_GPREL32 followed by a R_MIPS_64 then that -+ relocation is complete and needs no futher adjustment. */ -+ if ((rel == relocs -+ || rel[-1].r_offset != rel->r_offset -+ || r_type != R_MIPS_64 -+ || ELF_R_TYPE(abfd, rel[-1].r_info) != R_MIPS_GPREL32) -+ && MIPS_ELF_READONLY_SECTION (sec)) -+ { -+ /* We tell the dynamic linker that there are -+ relocations against the text segment. */ -+ info->flags |= DF_TEXTREL; -+ info->callbacks->warning -+ (info, -+ _("relocation emitted against readonly section"), -+ NULL, abfd, sec, rel->r_offset); -+ } - } - else - { -diff -rNU3 dist/bfd/elfxx-sparc.c dist.nbsd/bfd/elfxx-sparc.c ---- dist/bfd/elfxx-sparc.c Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/elfxx-sparc.c Wed Nov 7 11:13:53 2012 -@@ -2438,6 +2438,10 @@ - { - struct bfd_link_info *info = (struct bfd_link_info *) inf; - -+ if (info->warn_shared_textrel) -+ (*_bfd_error_handler) -+ (_("warning: dynamic relocation in readonly section `%s'"), -+ h->root.root.string); - info->flags |= DF_TEXTREL; - - /* Not an error, just cut short the traversal. */ -@@ -3388,10 +3392,8 @@ - memset (&outrel, 0, sizeof outrel); - /* h->dynindx may be -1 if the symbol was marked to - become local. */ -- else if (h != NULL && -- h->dynindx != -1 -- && (! is_plt -- || !info->shared -+ else if (h != NULL && h->dynindx != -1 && ! is_plt -+ && (!info->shared - || !SYMBOLIC_BIND (info, h) - || !h->def_regular)) - { -diff -rNU3 dist/bfd/libbfd.h dist.nbsd/bfd/libbfd.h ---- dist/bfd/libbfd.h Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/libbfd.h Wed Nov 7 11:13:54 2012 -@@ -2150,6 +2150,7 @@ - "BFD_RELOC_XC16X_SEG", - "BFD_RELOC_XC16X_SOF", - "BFD_RELOC_VAX_GLOB_DAT", -+ "BFD_RELOC_VAX_GLOB_REF", - "BFD_RELOC_VAX_JMP_SLOT", - "BFD_RELOC_VAX_RELATIVE", - "BFD_RELOC_MT_PC16", -diff -rNU3 dist/bfd/reloc.c dist.nbsd/bfd/reloc.c ---- dist/bfd/reloc.c Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/bfd/reloc.c Wed Nov 7 11:13:53 2012 -@@ -1775,6 +1775,17 @@ - Relocations used by 68K ELF. - - ENUM -+ BFD_RELOC_VAX_GLOB_DAT -+ENUMX -+ BFD_RELOC_VAX_GLOB_REF -+ENUMX -+ BFD_RELOC_VAX_JMP_SLOT -+ENUMX -+ BFD_RELOC_VAX_RELATIVE -+ENUMDOC -+ Relocations used by VAX ELF. -+ -+ENUM - BFD_RELOC_32_BASEREL - ENUMX - BFD_RELOC_16_BASEREL -diff -rNU3 dist/binutils/Makefile.in dist.nbsd/binutils/Makefile.in ---- dist/binutils/Makefile.in Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/binutils/Makefile.in Wed Nov 7 11:13:54 2012 -@@ -1,4 +1,4 @@ --# Makefile.in generated by automake 1.11.1 from Makefile.am. -+# Makefile.in generated by automake 1.11 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -@@ -49,10 +49,12 @@ - DIST_COMMON = NEWS README ChangeLog $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/configure \ - $(am__configure_deps) $(srcdir)/config.in \ -- $(srcdir)/../mkinstalldirs $(top_srcdir)/po/Make-in arparse.h \ -- arparse.c arlex.c defparse.h defparse.c deflex.c nlmheader.h \ -- nlmheader.c arparse.h arparse.c arlex.c mcparse.h mcparse.c \ -- rcparse.h rcparse.c $(srcdir)/../depcomp $(srcdir)/../ylwrap -+ $(srcdir)/../mkinstalldirs $(srcdir)/../mkinstalldirs \ -+ $(top_srcdir)/po/Make-in arparse.h arparse.c arlex.c \ -+ defparse.h defparse.c deflex.c nlmheader.h nlmheader.c \ -+ arparse.h arparse.c arlex.c mcparse.h mcparse.c rcparse.h \ -+ rcparse.c $(srcdir)/../depcomp $(srcdir)/../depcomp \ -+ $(srcdir)/../ylwrap $(srcdir)/../ylwrap - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \ - $(top_srcdir)/../config/zlib.m4 \ -@@ -380,6 +382,7 @@ - libexecdir = @libexecdir@ - localedir = @localedir@ - localstatedir = @localstatedir@ -+lt_ECHO = @lt_ECHO@ - mandir = @mandir@ - mkdir_p = @mkdir_p@ - oldincludedir = @oldincludedir@ -@@ -921,7 +924,7 @@ - # (which will cause the Makefiles to be regenerated when you run `make'); - # (2) otherwise, pass the desired values on the `make' command line. - $(RECURSIVE_TARGETS): -- @fail= failcom='exit 1'; \ -+ @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ -@@ -946,7 +949,7 @@ - fi; test -z "$$fail" - - $(RECURSIVE_CLEAN_TARGETS): -- @fail= failcom='exit 1'; \ -+ @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ -diff -rNU3 dist/binutils/aclocal.m4 dist.nbsd/binutils/aclocal.m4 ---- dist/binutils/aclocal.m4 Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/binutils/aclocal.m4 Wed Nov 7 11:13:54 2012 -@@ -1,4 +1,4 @@ --# generated automatically by aclocal 1.11.1 -*- Autoconf -*- -+# generated automatically by aclocal 1.11 -*- Autoconf -*- - - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -@@ -19,6 +19,31 @@ - If you have problems, you may need to regenerate the build system entirely. - To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -+# isc-posix.m4 serial 2 (gettext-0.11.2) -+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+# This file is not needed with autoconf-2.53 and newer. Remove it in 2005. -+ -+# This test replaces the one in autoconf. -+# Currently this macro should have the same name as the autoconf macro -+# because gettext's gettext.m4 (distributed in the automake package) -+# still uses it. Otherwise, the use in gettext.m4 makes autoheader -+# give these diagnostics: -+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX -+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX -+ -+undefine([AC_ISC_POSIX]) -+ -+AC_DEFUN([AC_ISC_POSIX], -+ [ -+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge. -+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) -+ ] -+) -+ - # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation -@@ -34,7 +59,7 @@ - [am__api_version='1.11' - dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to - dnl require some minimum version. Point them to the right macro. --m4_if([$1], [1.11.1], [], -+m4_if([$1], [1.11], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl - ]) - -@@ -50,7 +75,7 @@ - # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. - # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. - AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], --[AM_AUTOMAKE_VERSION([1.11.1])dnl -+[AM_AUTOMAKE_VERSION([1.11])dnl - m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl - _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) -diff -rNU3 dist/binutils/bucomm.c dist.nbsd/binutils/bucomm.c ---- dist/binutils/bucomm.c Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/binutils/bucomm.c Wed Nov 7 11:13:54 2012 -@@ -576,7 +576,14 @@ - file_name, strerror (errno)); - } - else if (! S_ISREG (statbuf.st_mode)) -- non_fatal (_("Warning: '%s' is not an ordinary file"), file_name); -+ { -+ if (!S_ISCHR(statbuf.st_mode)) -+ { -+ non_fatal (_("Warning: '%s' is not an ordinary file"), file_name); -+ return 0; -+ } -+ return statbuf.st_size ? statbuf.st_size : 1; -+ } - else if (statbuf.st_size < 0) - non_fatal (_("Warning: '%s' has negative size, probably it is too large"), - file_name); -diff -rNU3 dist/binutils/doc/Makefile.am dist.nbsd/binutils/doc/Makefile.am ---- dist/binutils/doc/Makefile.am Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/binutils/doc/Makefile.am Wed Nov 7 11:13:54 2012 -@@ -42,6 +42,8 @@ +diff -rNU3 dist.orig/binutils/configure dist.nbsd/binutils/configure +--- dist.orig/binutils/configure 2011-05-31 10:54:47.000000000 +0200 ++++ dist.nbsd/binutils/configure 2013-04-08 23:29:28.000000000 +0200 +@@ -14672,6 +14672,8 @@ + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ++ : Avoid regenerating within pkgsrc ++ exit 0 + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; +diff -rNU3 dist.orig/binutils/doc/Makefile.am dist.nbsd/binutils/doc/Makefile.am +--- dist.orig/binutils/doc/Makefile.am 2010-01-06 17:52:14.000000000 +0100 ++++ dist.nbsd/binutils/doc/Makefile.am 2013-04-09 08:24:32.000000000 +0200 +@@ -41,112 +41,144 @@ + -I "$(top_srcdir)/../bfd/doc" -I ../../bfd/doc # Man page generation from texinfo - addr2line.1: $(binutils_TEXI) $(binutils_TEXINFOS) +-addr2line.1: $(binutils_TEXI) $(binutils_TEXINFOS) ++addr2line.1: + @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_addr2line.1: ++NetBSD_DISABLED_addr2line.1: $(binutils_TEXI) $(binutils_TEXINFOS) touch $@ -$(TEXI2POD) $(MANCONF) -Daddr2line < $(binutils_TEXI) > addr2line.pod -($(POD2MAN) addr2line.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -49,6 +51,8 @@ + mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) rm -f addr2line.pod - ar.1: $(binutils_TEXI) $(binutils_TEXINFOS) +-ar.1: $(binutils_TEXI) $(binutils_TEXINFOS) ++ar.1: + @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_ar.1: ++NetBSD_DISABLED_ar.1: $(binutils_TEXI) $(binutils_TEXINFOS) touch $@ -$(TEXI2POD) $(MANCONF) -Dar < $(binutils_TEXI) > ar.pod -($(POD2MAN) ar.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -56,6 +60,8 @@ + mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) rm -f ar.pod - dlltool.1: $(binutils_TEXI) $(binutils_TEXINFOS) +-dlltool.1: $(binutils_TEXI) $(binutils_TEXINFOS) ++dlltool.1: + @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_dlltool.1: ++NetBSD_DISABLED_dlltool.1: $(binutils_TEXI) $(binutils_TEXINFOS) touch $@ -$(TEXI2POD) $(MANCONF) -Ddlltool < $(binutils_TEXI) > dlltool.pod -($(POD2MAN) dlltool.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -63,6 +69,8 @@ + mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) rm -f dlltool.pod - nlmconv.1: $(binutils_TEXI) $(binutils_TEXINFOS) +-nlmconv.1: $(binutils_TEXI) $(binutils_TEXINFOS) ++nlmconv.1: + @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_nlmconv.1: ++NetBSD_DISABLED_nlmconv.1: $(binutils_TEXI) $(binutils_TEXINFOS) touch $@ -$(TEXI2POD) $(MANCONF) -Dnlmconv < $(binutils_TEXI) > nlmconv.pod -($(POD2MAN) nlmconv.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -70,6 +78,8 @@ + mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) rm -f nlmconv.pod - nm.1: $(binutils_TEXI) $(binutils_TEXINFOS) +-nm.1: $(binutils_TEXI) $(binutils_TEXINFOS) ++nm.1: + @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_nm.1: ++NetBSD_DISABLED_nm.1: $(binutils_TEXI) $(binutils_TEXINFOS) touch $@ -$(TEXI2POD) $(MANCONF) -Dnm < $(binutils_TEXI) > nm.pod -($(POD2MAN) nm.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -77,6 +87,8 @@ + mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) rm -f nm.pod - objcopy.1: $(binutils_TEXI) $(binutils_TEXINFOS) +-objcopy.1: $(binutils_TEXI) $(binutils_TEXINFOS) ++objcopy.1: + @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_objcopy.1: ++NetBSD_DISABLED_objcopy.1: $(binutils_TEXI) $(binutils_TEXINFOS) touch $@ -$(TEXI2POD) $(MANCONF) -Dobjcopy < $(binutils_TEXI) > objcopy.pod -($(POD2MAN) objcopy.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -84,6 +96,8 @@ + mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) rm -f objcopy.pod - objdump.1: $(binutils_TEXI) $(binutils_TEXINFOS) +-objdump.1: $(binutils_TEXI) $(binutils_TEXINFOS) ++objdump.1: + @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_objdump.1: ++NetBSD_DISABLED_objdump.1: $(binutils_TEXI) $(binutils_TEXINFOS) touch $@ -$(TEXI2POD) $(MANCONF) -Dobjdump < $(binutils_TEXI) > objdump.pod -($(POD2MAN) objdump.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -91,6 +105,8 @@ + mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) rm -f objdump.pod - ranlib.1: $(binutils_TEXI) $(binutils_TEXINFOS) +-ranlib.1: $(binutils_TEXI) $(binutils_TEXINFOS) ++ranlib.1: + @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_ranlib.1: ++NetBSD_DISABLED_ranlib.1: $(binutils_TEXI) $(binutils_TEXINFOS) touch $@ -$(TEXI2POD) $(MANCONF) -Dranlib < $(binutils_TEXI) > ranlib.pod -($(POD2MAN) ranlib.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -98,6 +114,8 @@ + mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) rm -f ranlib.pod - readelf.1: $(binutils_TEXI) $(binutils_TEXINFOS) +-readelf.1: $(binutils_TEXI) $(binutils_TEXINFOS) ++readelf.1: + @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_readelf.1: ++NetBSD_DISABLED_readelf.1: $(binutils_TEXI) $(binutils_TEXINFOS) touch $@ -$(TEXI2POD) $(MANCONF) -Dreadelf < $(binutils_TEXI) > readelf.pod -($(POD2MAN) readelf.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -105,6 +123,8 @@ + mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) rm -f readelf.pod - size.1: $(binutils_TEXI) $(binutils_TEXINFOS) +-size.1: $(binutils_TEXI) $(binutils_TEXINFOS) ++size.1: + @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_size.1: ++NetBSD_DISABLED_size.1: $(binutils_TEXI) $(binutils_TEXINFOS) touch $@ -$(TEXI2POD) $(MANCONF) -Dsize < $(binutils_TEXI) > size.pod -($(POD2MAN) size.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -112,6 +132,8 @@ + mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) rm -f size.pod - strings.1: $(binutils_TEXI) $(binutils_TEXINFOS) +-strings.1: $(binutils_TEXI) $(binutils_TEXINFOS) ++strings.1: + @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_strings.1: ++NetBSD_DISABLED_strings.1: $(binutils_TEXI) $(binutils_TEXINFOS) touch $@ -$(TEXI2POD) $(MANCONF) -Dstrings < $(binutils_TEXI) > strings.pod -($(POD2MAN) strings.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -119,6 +141,8 @@ + mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) rm -f strings.pod - strip.1: $(binutils_TEXI) $(binutils_TEXINFOS) +-strip.1: $(binutils_TEXI) $(binutils_TEXINFOS) ++strip.1: + @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_strip.1: ++NetBSD_DISABLED_strip.1: $(binutils_TEXI) $(binutils_TEXINFOS) touch $@ -$(TEXI2POD) $(MANCONF) -Dstrip < $(binutils_TEXI) > strip.pod -($(POD2MAN) strip.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -133,6 +157,8 @@ - rm -f elfedit.pod - - windres.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_windres.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dwindres < $(binutils_TEXI) > windres.pod - -($(POD2MAN) windres.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -140,6 +166,8 @@ - rm -f windres.pod - - windmc.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_windmc.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dwindmc < $(binutils_TEXI) > windmc.pod - -($(POD2MAN) windmc.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -147,6 +175,8 @@ - rm -f windmc.pod - - cxxfilt.man: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_cxxfilt.man: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dcxxfilt < $(binutils_TEXI) > $(DEMANGLER_NAME).pod - -($(POD2MAN) $(DEMANGLER_NAME).pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -diff -rNU3 dist/binutils/doc/Makefile.in dist.nbsd/binutils/doc/Makefile.in ---- dist/binutils/doc/Makefile.in Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/binutils/doc/Makefile.in Wed Nov 7 11:13:54 2012 -@@ -1,4 +1,4 @@ --# Makefile.in generated by automake 1.11.1 from Makefile.am. -+# Makefile.in generated by automake 1.11 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -@@ -240,6 +240,7 @@ - libexecdir = @libexecdir@ - localedir = @localedir@ - localstatedir = @localstatedir@ -+lt_ECHO = @lt_ECHO@ - mandir = @mandir@ - mkdir_p = @mkdir_p@ - oldincludedir = @oldincludedir@ -@@ -347,6 +348,8 @@ - -rm -rf .libs _libs - - binutils.info: binutils.texi -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_binutils.info: binutils.texi - restore=: && backupdir="$(am__leading_dot)am$$$$" && \ - rm -rf $$backupdir && mkdir $$backupdir && \ - if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ -@@ -733,6 +736,8 @@ - - # Man page generation from texinfo - addr2line.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_addr2line.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Daddr2line < $(binutils_TEXI) > addr2line.pod - -($(POD2MAN) addr2line.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -740,6 +745,8 @@ - rm -f addr2line.pod - - ar.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_ar.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dar < $(binutils_TEXI) > ar.pod - -($(POD2MAN) ar.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -747,6 +754,8 @@ - rm -f ar.pod - - dlltool.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_dlltool.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Ddlltool < $(binutils_TEXI) > dlltool.pod - -($(POD2MAN) dlltool.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -754,6 +763,8 @@ - rm -f dlltool.pod - - nlmconv.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_nlmconv.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dnlmconv < $(binutils_TEXI) > nlmconv.pod - -($(POD2MAN) nlmconv.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -761,6 +772,8 @@ - rm -f nlmconv.pod - - nm.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_nm.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dnm < $(binutils_TEXI) > nm.pod - -($(POD2MAN) nm.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -768,6 +781,8 @@ - rm -f nm.pod - - objcopy.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_objcopy.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dobjcopy < $(binutils_TEXI) > objcopy.pod - -($(POD2MAN) objcopy.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -775,6 +790,8 @@ - rm -f objcopy.pod - - objdump.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_objdump.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dobjdump < $(binutils_TEXI) > objdump.pod - -($(POD2MAN) objdump.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -782,6 +799,8 @@ - rm -f objdump.pod - - ranlib.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_ranlib.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dranlib < $(binutils_TEXI) > ranlib.pod - -($(POD2MAN) ranlib.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -789,6 +808,8 @@ - rm -f ranlib.pod - - readelf.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_readelf.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dreadelf < $(binutils_TEXI) > readelf.pod - -($(POD2MAN) readelf.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -796,6 +817,8 @@ - rm -f readelf.pod - - size.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_size.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dsize < $(binutils_TEXI) > size.pod - -($(POD2MAN) size.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -803,6 +826,8 @@ - rm -f size.pod - - strings.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_strings.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dstrings < $(binutils_TEXI) > strings.pod - -($(POD2MAN) strings.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -810,6 +835,8 @@ - rm -f strings.pod - - strip.1: $(binutils_TEXI) $(binutils_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_strip.1: - touch $@ - -$(TEXI2POD) $(MANCONF) -Dstrip < $(binutils_TEXI) > strip.pod - -($(POD2MAN) strip.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -817,6 +844,8 @@ + mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) rm -f strip.pod - elfedit.1: $(binutils_TEXI) $(binutils_TEXINFOS) +-elfedit.1: $(binutils_TEXI) $(binutils_TEXINFOS) ++elfedit.1: + @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_elfedit.1: ++NetBSD_DISABLED_elfedit.1: $(binutils_TEXI) $(binutils_TEXINFOS) touch $@ -$(TEXI2POD) $(MANCONF) -Delfedit < $(binutils_TEXI) > elfedit.pod -($(POD2MAN) elfedit.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -824,6 +853,8 @@ + mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) rm -f elfedit.pod - windres.1: $(binutils_TEXI) $(binutils_TEXINFOS) +-windres.1: $(binutils_TEXI) $(binutils_TEXINFOS) ++windres.1: + @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_windres.1: ++NetBSD_DISABLED_windres.1: $(binutils_TEXI) $(binutils_TEXINFOS) touch $@ -$(TEXI2POD) $(MANCONF) -Dwindres < $(binutils_TEXI) > windres.pod -($(POD2MAN) windres.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -831,6 +862,8 @@ + mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) rm -f windres.pod - windmc.1: $(binutils_TEXI) $(binutils_TEXINFOS) +-windmc.1: $(binutils_TEXI) $(binutils_TEXINFOS) ++windmc.1: + @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_windmc.1: ++NetBSD_DISABLED_windmc.1: $(binutils_TEXI) $(binutils_TEXINFOS) touch $@ -$(TEXI2POD) $(MANCONF) -Dwindmc < $(binutils_TEXI) > windmc.pod -($(POD2MAN) windmc.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -@@ -838,6 +871,8 @@ + mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) rm -f windmc.pod - cxxfilt.man: $(binutils_TEXI) $(binutils_TEXINFOS) +-cxxfilt.man: $(binutils_TEXI) $(binutils_TEXINFOS) ++cxxfilt.man: + @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_cxxfilt.man: ++NetBSD_DISABLED_cxxfilt.man: $(binutils_TEXI) $(binutils_TEXINFOS) touch $@ -$(TEXI2POD) $(MANCONF) -Dcxxfilt < $(binutils_TEXI) > $(DEMANGLER_NAME).pod -($(POD2MAN) $(DEMANGLER_NAME).pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -diff -rNU3 dist/binutils/doc/elfedit.1 dist.nbsd/binutils/doc/elfedit.1 ---- dist/binutils/doc/elfedit.1 Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/binutils/doc/elfedit.1 Wed Nov 7 11:13:54 2012 -@@ -1,15 +1,7 @@ --.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05) -+.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) - .\" - .\" Standard preamble: - .\" ======================================================================== --.de Sh \" Subsection heading --.br --.if t .Sp --.ne 5 --.PP --\fB\\$1\fR --.PP --.. - .de Sp \" Vertical space (when we can't use .PP) - .if t .sp .5v - .if n .sp -@@ -53,7 +45,7 @@ - .el .ds Aq ' - .\" - .\" If the F register is turned on, we'll generate index entries on stderr for --.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index -+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index - .\" entries marked with X<> in POD. Of course, you'll have to process the - .\" output yourself in some meaningful fashion. - .ie \nF \{\ -@@ -132,7 +124,7 @@ - .\" ======================================================================== - .\" - .IX Title "ELFEDIT 1" --.TH ELFEDIT 1 "2011-06-27" "binutils-2.21.1" "GNU Development Tools" -+.TH ELFEDIT 1 "2011-09-24" "binutils-2.21.1" "GNU Development Tools" - .\" For nroff, turn off justification. Always turn off hyphenation; it makes - .\" way too many mistakes in technical documents. - .if n .ad l -diff -rNU3 dist/binutils/doc/strings.1 dist.nbsd/binutils/doc/strings.1 ---- dist/binutils/doc/strings.1 Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/binutils/doc/strings.1 Wed Nov 7 11:13:54 2012 -@@ -216,7 +216,7 @@ - characters (\s-1ASCII\s0, \s-1ISO\s0 8859, etc., default), \fBS\fR = - single\-8\-bit\-byte characters, \fBb\fR = 16\-bit bigendian, \fBl\fR = - 16\-bit littleendian, \fBB\fR = 32\-bit bigendian, \fBL\fR = 32\-bit --littleendian. Useful for finding wide character strings. (\fBl\fR -+littleendian. Useful for finding wide-character strings. (\fBl\fR - and \fBb\fR apply to, for example, Unicode \s-1UTF\-16/UCS\-2\s0 encodings). - .IP "\fB\-T\fR \fIbfdname\fR" 4 - .IX Item "-T bfdname" -diff -rNU3 dist/binutils/objcopy.c dist.nbsd/binutils/objcopy.c ---- dist/binutils/objcopy.c Wed Nov 7 11:43:32 2012 -+++ dist.nbsd/binutils/objcopy.c Wed Nov 7 11:13:54 2012 -@@ -31,6 +31,7 @@ - #include "fnmatch.h" - #include "elf-bfd.h" - #include -+#include - #include "libbfd.h" - #include "coff/internal.h" - #include "libcoff.h" -diff -rNU3 dist/binutils/readelf.c dist.nbsd/binutils/readelf.c ---- dist/binutils/readelf.c Wed Nov 7 11:43:31 2012 -+++ dist.nbsd/binutils/readelf.c Wed Nov 7 11:13:54 2012 -@@ -11933,6 +11933,23 @@ - } - break; - -+ /* On SuperH, PT_GETREGS == mach+3 and PT_GETFPREGS == mach+5. -+ There's also old PT___GETREGS40 == mach + 1 for old reg -+ structure which lacks GBR. */ -+ case EM_SH: -+ switch (e_type) -+ { -+ case NT_NETBSDCORE_FIRSTMACH + 1: -+ return _("PT___GETREGS40 (old reg structure)"); -+ case NT_NETBSDCORE_FIRSTMACH + 3: -+ return _("PT_GETREGS (reg structure)"); -+ case NT_NETBSDCORE_FIRSTMACH + 5: -+ return _("PT_GETFPREGS (fpreg structure)"); -+ default: -+ break; -+ } -+ break; -+ - /* On all other arch's, PT_GETREGS == mach+1 and - PT_GETFPREGS == mach+3. */ - default: -diff -rNU3 dist/binutils/strings.c dist.nbsd/binutils/strings.c ---- dist/binutils/strings.c Wed Nov 7 11:43:31 2012 -+++ dist.nbsd/binutils/strings.c Wed Nov 7 11:13:54 2012 -@@ -596,7 +596,7 @@ - else - #elif !BFD_HOST_64BIT_LONG - if (start != (unsigned long) start) -- printf ("++%7ld ", (unsigned long) start); -+ printf ("++%7llu ", (unsigned long) start); - else - #endif - printf ("%7ld ", (long) start); -diff -rNU3 dist/config.guess dist.nbsd/config.guess ---- dist/config.guess Wed Nov 7 11:43:31 2012 -+++ dist.nbsd/config.guess Wed Nov 7 11:13:54 2012 -@@ -968,6 +968,9 @@ - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; -+ tile*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; -diff -rNU3 dist/config.sub dist.nbsd/config.sub ---- dist/config.sub Wed Nov 7 11:43:31 2012 -+++ dist.nbsd/config.sub Wed Nov 7 11:13:54 2012 -@@ -4,7 +4,7 @@ - # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 - # Free Software Foundation, Inc. - --timestamp='2010-05-21' -+timestamp='2009-12-31' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software -@@ -124,9 +124,9 @@ - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ -- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ -- knetbsd*-gnu* | netbsd*-gnu* | \ -+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ -+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | \ -+ netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os -@@ -296,7 +296,7 @@ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ -- | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ -+ | tahoe | thumb | tic4x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e \ - | we32k \ -@@ -304,15 +304,6 @@ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; -- c54x) -- basic_machine=tic54x-unknown -- ;; -- c55x) -- basic_machine=tic55x-unknown -- ;; -- c6x) -- basic_machine=tic6x-unknown -- ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown -@@ -344,7 +335,7 @@ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ -- | c[123]* | c30-* | [cjt]90-* | c4x-* \ -+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ -@@ -391,8 +382,7 @@ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ -- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ -- | tile-* | tilegx-* \ -+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | vax-* \ -@@ -492,15 +482,6 @@ - basic_machine=powerpc-ibm - os=-cnk - ;; -- c54x-*) -- basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` -- ;; -- c55x-*) -- basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` -- ;; -- c6x-*) -- basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` -- ;; - c90) - basic_machine=c90-cray - os=-unicos -@@ -1094,11 +1075,18 @@ - basic_machine=t90-cray - os=-unicos - ;; -- # This must be matched before tile*. -- tilegx*) -- basic_machine=tilegx-unknown -- os=-linux-gnu -+ tic54x | c54x*) -+ basic_machine=tic54x-unknown -+ os=-coff - ;; -+ tic55x | c55x*) -+ basic_machine=tic55x-unknown -+ os=-coff -+ ;; -+ tic6x | c6x*) -+ basic_machine=tic6x-unknown -+ os=-coff -+ ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu -@@ -1308,8 +1296,7 @@ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -linux-android* \ -- | -linux-newlib* | -linux-uclibc* \ -+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ -@@ -1491,15 +1478,6 @@ - ;; - c4x-* | tic4x-*) - os=-coff -- ;; -- tic54x-*) -- os=-coff -- ;; -- tic55x-*) -- os=-coff -- ;; -- tic6x-*) -- os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) -diff -rNU3 dist/configure dist.nbsd/configure ---- dist/configure Wed Nov 7 11:43:31 2012 -+++ dist.nbsd/configure Wed Nov 7 11:13:54 2012 -@@ -2670,7 +2670,7 @@ - # binutils, gas and ld appear in that order because it makes sense to run - # "make check" in that particular order. - # If --enable-gold is used, "gold" may replace "ld". --host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc cgen sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools" -+host_tools="byacc flex bison binutils gas ld fixincludes gcc cgen sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools" - - # libgcj represents the runtime libraries only used by gcj. - libgcj="target-libffi \ -diff -rNU3 dist/gas/atof-generic.c dist.nbsd/gas/atof-generic.c ---- dist/gas/atof-generic.c Wed Nov 7 11:43:31 2012 -+++ dist.nbsd/gas/atof-generic.c Wed Nov 7 11:13:45 2012 -@@ -121,6 +121,32 @@ - - switch (first_digit[0]) - { -+ case 's': -+ case 'S': -+ if (!strncasecmp ("snan", first_digit, 4)) -+ { -+ address_of_generic_floating_point_number->sign = 0; -+ address_of_generic_floating_point_number->exponent = 0; -+ address_of_generic_floating_point_number->leader = -+ address_of_generic_floating_point_number->low; -+ *address_of_string_pointer = first_digit + 4; -+ return 0; -+ } -+ break; -+ -+ case 'q': -+ case 'Q': -+ if (!strncasecmp ("qnan", first_digit, 4)) -+ { -+ address_of_generic_floating_point_number->sign = 0; -+ address_of_generic_floating_point_number->exponent = 0; -+ address_of_generic_floating_point_number->leader = -+ address_of_generic_floating_point_number->low; -+ *address_of_string_pointer = first_digit + 4; -+ return 0; -+ } -+ break; -+ - case 'n': - case 'N': - if (!strncasecmp ("nan", first_digit, 3)) -diff -rNU3 dist/gas/config/atof-vax.c dist.nbsd/gas/config/atof-vax.c ---- dist/gas/config/atof-vax.c Wed Nov 7 11:43:31 2012 -+++ dist.nbsd/gas/config/atof-vax.c Wed Nov 7 11:13:46 2012 -@@ -268,10 +268,27 @@ - int exponent_skippage; - LITTLENUM_TYPE word1; - -- /* JF: Deal with new Nan, +Inf and -Inf codes. */ - if (f->sign != '-' && f->sign != '+') - { -- make_invalid_floating_point_number (words); -+ if (f->sign == 0) -+ { -+ /* All NaNs are 0. */ -+ memset (words, 0x00, sizeof (LITTLENUM_TYPE) * precision); -+ } -+ else if (f->sign == 'P') -+ { -+ /* Positive Infinity. */ -+ memset (words, 0xff, sizeof (LITTLENUM_TYPE) * precision); -+ words[0] &= 0x7fff; -+ } -+ else if (f->sign == 'N') -+ { -+ /* Negative Infinity. */ -+ memset (words, 0x00, sizeof (LITTLENUM_TYPE) * precision); -+ words[0] = 0x0080; -+ } -+ else -+ make_invalid_floating_point_number (words); - return return_value; - } - -diff -rNU3 dist/gas/config/tc-arm.c dist.nbsd/gas/config/tc-arm.c ---- dist/gas/config/tc-arm.c Wed Nov 7 11:43:31 2012 -+++ dist.nbsd/gas/config/tc-arm.c Wed Nov 7 11:13:46 2012 -@@ -16133,12 +16133,16 @@ - asection *sect; - - for (sect = stdoutput->sections; sect != NULL; sect = sect->next) -- if (seg_info (sect)->tc_segment_info_data.current_it.state -- == MANUAL_IT_BLOCK) -- { -- as_warn (_("section '%s' finished with an open IT block."), -- sect->name); -- } -+ { -+ segment_info_type *seginfo = seg_info (sect); -+ -+ if (seginfo && seginfo->tc_segment_info_data.current_it.state -+ == MANUAL_IT_BLOCK) -+ { -+ as_warn (_("section '%s' finished with an open IT block."), -+ sect->name); -+ } -+ } - #else - if (now_it.state == MANUAL_IT_BLOCK) - as_warn (_("file finished with an open IT block.")); -diff -rNU3 dist/gas/config/tc-mips.c dist.nbsd/gas/config/tc-mips.c ---- dist/gas/config/tc-mips.c Wed Nov 7 11:43:31 2012 -+++ dist.nbsd/gas/config/tc-mips.c Wed Nov 7 11:13:46 2012 -@@ -763,6 +763,9 @@ - NUM_FIX_VR4120_CLASSES - }; - -+/* ...likewise -mtrap-zero-jump. */ -+static bfd_boolean mips_trap_zero_jump; -+ - /* ...likewise -mfix-loongson2f-jump. */ - static bfd_boolean mips_fix_loongson2f_jump; - -@@ -795,6 +798,8 @@ - efficient expansion. */ - - static int mips_relax_branch; -+ -+static int mips_fix_loongson2f_btb; - - /* The expansion of many macros depends on the type of symbol that - they refer to. For example, when generating position-dependent code, -@@ -1068,6 +1073,7 @@ - static void mips16_macro_build - (expressionS *, const char *, const char *, va_list *); - static void load_register (int, expressionS *, int); -+static void macro_build (expressionS *, const char *, const char *, ...); - static void macro_start (void); - static void macro_end (void); - static void macro (struct mips_cl_insn * ip); -@@ -2744,6 +2750,35 @@ - return nops; - } - -+static void -+trap_zero_jump (struct mips_cl_insn * ip) -+{ -+ if (strcmp (ip->insn_mo->name, "j") == 0 -+ || strcmp (ip->insn_mo->name, "jr") == 0 -+ || strcmp (ip->insn_mo->name, "jalr") == 0) -+ { -+ int sreg; -+ -+ if (mips_opts.warn_about_macros) -+ return; -+ -+ sreg = EXTRACT_OPERAND (RS, *ip); -+ if (mips_opts.isa == ISA_MIPS32 -+ || mips_opts.isa == ISA_MIPS32R2 -+ || mips_opts.isa == ISA_MIPS64 -+ || mips_opts.isa == ISA_MIPS64R2) -+ { -+ expressionS ep; -+ ep.X_op = O_constant; -+ ep.X_add_number = 4096; -+ macro_build (&ep, "tltiu", "s,j", sreg, BFD_RELOC_LO16); -+ } -+ else if (mips_opts.isa != ISA_UNKNOWN -+ && mips_opts.isa != ISA_MIPS1) -+ macro_build (NULL, "teq", "s,t", sreg, 0); -+ } -+} -+ - /* Fix NOP issue: Replace nops by "or at,at,zero". */ - - static void -@@ -2779,6 +2814,12 @@ - ep.X_add_number = 0xffff; - macro_build (&ep, "ori", "t,r,i", ATREG, ATREG, BFD_RELOC_LO16); - macro_build (NULL, "and", "d,v,t", sreg, sreg, ATREG); -+ /* Hide these three instructions to avoid getting a ``macro expanded into -+ multiple instructions'' warning. */ -+ if (mips_relax.sequence != 2) -+ mips_macro_warning.sizes[0] -= 3 * 4; -+ if (mips_relax.sequence != 1) -+ mips_macro_warning.sizes[1] -= 3 * 4; - } - } - -@@ -2807,6 +2848,8 @@ - - if (mips_fix_loongson2f) - fix_loongson2f (ip); -+ if (mips_trap_zero_jump) -+ trap_zero_jump (ip); - - /* Mark instruction labels in mips16 mode. */ - mips16_mark_labels (); -@@ -3602,6 +3645,41 @@ - r[i] = (bfd_reloc_code_real_type) va_arg (*args, int); - } - -+/* Fix jump through register issue on loongson2f processor for kernel code: -+ force a BTB clear before the jump to prevent it from being incorrectly -+ prefetched by the branch prediction engine. */ -+ -+static void -+macro_build_jrpatch (expressionS *ep, unsigned int sreg) -+{ -+ if (!mips_fix_loongson2f_btb) -+ return; -+ -+ if (sreg == ZERO || sreg == KT0 || sreg == KT1 || sreg == AT) -+ return; -+ -+ if (!mips_opts.at) -+ { -+ as_warn (_("unable to apply loongson2f BTB workaround when .set noat")); -+ return; -+ } -+ -+ /* li $at, COP_0_BTB_CLEAR | COP_0_RAS_DISABLE */ -+ ep->X_op = O_constant; -+ ep->X_add_number = 3; -+ macro_build (ep, "ori", "t,r,i", AT, ZERO, BFD_RELOC_LO16); -+ -+ /* dmtc0 $at, COP_0_DIAG */ -+ macro_build (NULL, "dmtc0", "t,G", AT, 22); -+ -+ /* Hide these two instructions to avoid getting a ``macro expanded into -+ multiple instructions'' warning. */ -+ if (mips_relax.sequence != 2) -+ mips_macro_warning.sizes[0] -= 2 * 4; -+ if (mips_relax.sequence != 1) -+ mips_macro_warning.sizes[1] -= 2 * 4; -+} -+ - /* Build an instruction created by a macro expansion. This is passed - a pointer to the count of instructions created so far, an - expression, the name of the instruction to build, an operand format -@@ -3999,6 +4077,7 @@ - frag_grow (8); - f = frag_more (0); - } -+ macro_build_jrpatch (ep, PIC_CALL_REG); - macro_build (NULL, "jalr", "d,s", RA, PIC_CALL_REG); - if (MIPS_JALR_HINT_P (ep)) - fix_new_exp (frag_now, f - frag_now->fr_literal, -@@ -6138,6 +6217,26 @@ - macro_build (NULL, ADDRESS_ADD_INSN, "d,v,t", treg, tempreg, breg); - break; - -+ case M_JR_S: -+ macro_build_jrpatch (&expr1, sreg); -+ macro_build (NULL, "jr", "s", sreg); -+ return; /* didn't modify $at */ -+ -+ case M_J_S: -+ macro_build_jrpatch (&expr1, sreg); -+ macro_build (NULL, "j", "s", sreg); -+ return; /* didn't modify $at */ -+ -+ case M_JALR_S: -+ macro_build_jrpatch (&expr1, sreg); -+ macro_build (NULL, "jalr", "s", sreg); -+ return; /* didn't modify $at */ -+ -+ case M_JALR_DS: -+ macro_build_jrpatch (&expr1, sreg); -+ macro_build (NULL, "jalr", "d,s", dreg, sreg); -+ return; /* didn't modify $at */ -+ - case M_MSGSND: - { - unsigned long temp = (treg << 16) | (0x01); -@@ -6193,12 +6292,16 @@ - /* Fall through. */ - case M_JAL_2: - if (mips_pic == NO_PIC) -- macro_build (NULL, "jalr", "d,s", dreg, sreg); -+ { -+ macro_build_jrpatch (&expr1, sreg); -+ macro_build (NULL, "jalr", "d,s", dreg, sreg); -+ } - else - { - if (sreg != PIC_CALL_REG) - as_warn (_("MIPS PIC call to register other than $25")); - -+ macro_build_jrpatch (&expr1, sreg); - macro_build (NULL, "jalr", "d,s", dreg, sreg); - if (mips_pic == SVR4_PIC && !HAVE_NEWABI) - { -@@ -11243,6 +11346,8 @@ - OPTION_SINGLE_FLOAT, - OPTION_DOUBLE_FLOAT, - OPTION_32, -+ OPTION_TRAP_ZERO_JUMP, -+ OPTION_NO_TRAP_ZERO_JUMP, - #ifdef OBJ_ELF - OPTION_CALL_SHARED, - OPTION_CALL_NONPIC, -@@ -11257,6 +11362,8 @@ - OPTION_NO_PDR, - OPTION_MVXWORKS_PIC, - #endif /* OBJ_ELF */ -+ OPTION_FIX_LOONGSON2F_BTB, -+ OPTION_NO_FIX_LOONGSON2F_BTB, - OPTION_END_OF_ENUM - }; - -@@ -11310,6 +11417,8 @@ - {"mno-fix-loongson2f-jump", no_argument, NULL, OPTION_NO_FIX_LOONGSON2F_JUMP}, - {"mfix-loongson2f-nop", no_argument, NULL, OPTION_FIX_LOONGSON2F_NOP}, - {"mno-fix-loongson2f-nop", no_argument, NULL, OPTION_NO_FIX_LOONGSON2F_NOP}, -+ {"mfix-loongson2f-btb", no_argument, NULL, OPTION_FIX_LOONGSON2F_BTB}, -+ {"mno-fix-loongson2f-btb", no_argument, NULL, OPTION_NO_FIX_LOONGSON2F_BTB}, - {"mfix-vr4120", no_argument, NULL, OPTION_FIX_VR4120}, - {"mno-fix-vr4120", no_argument, NULL, OPTION_NO_FIX_VR4120}, - {"mfix-vr4130", no_argument, NULL, OPTION_FIX_VR4130}, -@@ -11348,6 +11457,9 @@ - make testing easier. */ - {"32", no_argument, NULL, OPTION_32}, - -+ {"mtrap-zero-jump", no_argument, NULL, OPTION_TRAP_ZERO_JUMP}, -+ {"mno-trap-zero-jump", no_argument, NULL, OPTION_NO_TRAP_ZERO_JUMP}, -+ - /* ELF-specific options. */ - #ifdef OBJ_ELF - {"KPIC", no_argument, NULL, OPTION_CALL_SHARED}, -@@ -11611,6 +11723,14 @@ - mips_fix_vr4130 = 0; - break; - -+ case OPTION_FIX_LOONGSON2F_BTB: -+ mips_fix_loongson2f_btb = 1; -+ break; -+ -+ case OPTION_NO_FIX_LOONGSON2F_BTB: -+ mips_fix_loongson2f_btb = 0; -+ break; -+ - case OPTION_FIX_CN63XXP1: - mips_fix_cn63xxp1 = TRUE; - break; -@@ -11643,6 +11763,14 @@ - mips_opts.sym32 = FALSE; - break; - -+ case OPTION_TRAP_ZERO_JUMP: -+ mips_trap_zero_jump = TRUE; -+ break; -+ -+ case OPTION_NO_TRAP_ZERO_JUMP: -+ mips_trap_zero_jump = FALSE; -+ break; -+ - #ifdef OBJ_ELF - /* When generating ELF code, we permit -KPIC and -call_shared to - select SVR4_PIC, and -non_shared to select no PIC. This is -@@ -15587,6 +15715,7 @@ - fprintf (stream, _("\ - -mfix-loongson2f-jump work around Loongson2F JUMP instructions\n\ - -mfix-loongson2f-nop work around Loongson2F NOP errata\n\ -+-mfix-loongson2f-btb work around Loongson2F BTB errata\n\ - -mfix-vr4120 work around certain VR4120 errata\n\ - -mfix-vr4130 work around VR4130 mflo/mfhi errata\n\ - -mfix-24k insert a nop after ERET and DERET instructions\n\ -diff -rNU3 dist/gas/config/tc-vax.c dist.nbsd/gas/config/tc-vax.c ---- dist/gas/config/tc-vax.c Wed Nov 7 11:43:31 2012 -+++ dist.nbsd/gas/config/tc-vax.c Wed Nov 7 11:13:46 2012 -@@ -392,6 +392,9 @@ - && (PLT_symbol == NULL || fragP->fr_symbol != PLT_symbol) - && fragP->fr_symbol != NULL - && flag_want_pic -+#ifdef OBJ_ELF -+ && ELF_ST_VISIBILITY (S_GET_OTHER (fragP->fr_symbol)) != STV_HIDDEN -+#endif - && (!S_IS_DEFINED (fragP->fr_symbol) - || S_IS_WEAK (fragP->fr_symbol) - || S_IS_EXTERNAL (fragP->fr_symbol))) -@@ -1073,6 +1076,154 @@ - return retval; - } - -+#ifdef OBJ_AOUT -+#ifndef BFD_ASSEMBLER -+void -+tc_aout_fix_to_chars (where, fixP, segment_address_in_file) -+ char *where; -+ fixS *fixP; -+ relax_addressT segment_address_in_file; -+{ -+ /* -+ * In: length of relocation (or of address) in chars: 1, 2 or 4. -+ * Out: GNU LD relocation length code: 0, 1, or 2. -+ */ -+ -+ static const unsigned char nbytes_r_length[] = {42, 0, 1, 42, 2}; -+ int r_symbolnum; -+ int r_flags; -+ -+ know (fixP->fx_addsy != NULL); -+ -+ md_number_to_chars (where, -+ fixP->fx_frag->fr_address + fixP->fx_where - segment_address_in_file, -+ 4); -+ -+ r_symbolnum = (S_IS_DEFINED (fixP->fx_addsy) -+ ? S_GET_TYPE (fixP->fx_addsy) -+ : fixP->fx_addsy->sy_number); -+ r_flags = (fixP->fx_pcrel ? 1 : 0) -+ | (!S_IS_DEFINED (fixP->fx_addsy) ? 8 : 0) /* extern */ -+ | ((nbytes_r_length[fixP->fx_size] & 3) << 1); -+ -+#if 0 -+ r_flags |= ((!S_IS_DEFINED(fixP->fx_addsy) -+ && fixP->fx_pcrel -+ && fixP->fx_addsy != GOT_symbol -+ && fixP->fx_addsy != PLT_symbol -+ && flags_want_pic) ? 0x10 : 0); -+#endif -+ -+ switch (fixP->fx_r_type) { -+ case NO_RELOC: -+ break; -+ case NO_RELOC2: -+ if (r_flags & 8) -+ r_flags |= 0x80; /* setting the copy bit */ -+ /* says we can convert */ -+ /* to gotslot if needed */ -+ break; -+ case RELOC_32: -+ if (flag_want_pic && S_IS_EXTERNAL(fixP->fx_addsy)) { -+ r_symbolnum = fixP->fx_addsy->sy_number; -+ r_flags |= 8; /* set extern bit */ -+ } -+ break; -+ case RELOC_JMP_SLOT: -+ if (flag_want_pic) { -+ r_flags |= 0x20; /* set jmptable */ -+ r_flags &= ~0x08; /* clear extern bit */ -+ } -+ break; -+ case RELOC_JMP_TBL: -+ if (flag_want_pic) { -+ r_flags |= 0x20; /* set jmptable */ -+ r_flags |= 0x08; /* set extern bit */ -+ } -+ break; -+ case RELOC_GLOB_DAT: -+ if (flag_want_pic) { -+ r_flags |= 0x10; /* set baserel bit */ -+ r_symbolnum = fixP->fx_addsy->sy_number; -+ if (S_IS_EXTERNAL(fixP->fx_addsy)) -+ r_flags |= 8; /* set extern bit */ -+ } -+ break; -+ } -+ -+ where[4] = (r_symbolnum >> 0) & 0xff; -+ where[5] = (r_symbolnum >> 8) & 0xff; -+ where[6] = (r_symbolnum >> 16) & 0xff; -+ where[7] = r_flags; -+} -+#endif /* !BFD_ASSEMBLER */ -+#endif /* OBJ_AOUT */ -+ -+/* -+ * BUGS, GRIPES, APOLOGIA, etc. -+ * -+ * The opcode table 'votstrs' needs to be sorted on opcode frequency. -+ * That is, AFTER we hash it with hash_...(), we want most-used opcodes -+ * to come out of the hash table faster. -+ * -+ * I am sorry to inflict yet another VAX assembler on the world, but -+ * RMS says we must do everything from scratch, to prevent pin-heads -+ * restricting this software. -+ */ -+ -+/* -+ * This is a vaguely modular set of routines in C to parse VAX -+ * assembly code using DEC mnemonics. It is NOT un*x specific. -+ * -+ * The idea here is that the assembler has taken care of all: -+ * labels -+ * macros -+ * listing -+ * pseudo-ops -+ * line continuation -+ * comments -+ * condensing any whitespace down to exactly one space -+ * and all we have to do is parse 1 line into a vax instruction -+ * partially formed. We will accept a line, and deliver: -+ * an error message (hopefully empty) -+ * a skeleton VAX instruction (tree structure) -+ * textual pointers to all the operand expressions -+ * a warning message that notes a silly operand (hopefully empty) -+ */ -+ -+/* -+ * E D I T H I S T O R Y -+ * -+ * 17may86 Dean Elsner. Bug if line ends immediately after opcode. -+ * 30apr86 Dean Elsner. New vip_op() uses arg block so change call. -+ * 6jan86 Dean Elsner. Crock vip_begin() to call vip_op_defaults(). -+ * 2jan86 Dean Elsner. Invent synthetic opcodes. -+ * Widen vax_opcodeT to 32 bits. Use a bit for VIT_OPCODE_SYNTHETIC, -+ * which means this is not a real opcode, it is like a macro; it will -+ * be relax()ed into 1 or more instructions. -+ * Use another bit for VIT_OPCODE_SPECIAL if the op-code is not optimised -+ * like a regular branch instruction. Option added to vip_begin(): -+ * exclude synthetic opcodes. Invent synthetic_votstrs[]. -+ * 31dec85 Dean Elsner. Invent vit_opcode_nbytes. -+ * Also make vit_opcode into a char[]. We now have n-byte vax opcodes, -+ * so caller's don't have to know the difference between a 1-byte & a -+ * 2-byte op-code. Still need vax_opcodeT concept, so we know how -+ * big an object must be to hold an op.code. -+ * 30dec85 Dean Elsner. Widen typedef vax_opcodeT in "vax-inst.h" -+ * because vax opcodes may be 16 bits. Our crufty C compiler was -+ * happily initialising 8-bit vot_codes with 16-bit numbers! -+ * (Wouldn't the 'phone company like to compress data so easily!) -+ * 29dec85 Dean Elsner. New static table vax_operand_width_size[]. -+ * Invented so we know hw many bytes a "I^#42" needs in its immediate -+ * operand. Revised struct vop in "vax-inst.h": explicitly include -+ * byte length of each operand, and it's letter-code datum type. -+ * 17nov85 Dean Elsner. Name Change. -+ * Due to ar(1) truncating names, we learned the hard way that -+ * "vax-inst-parse.c" -> "vax-inst-parse." dropping the "o" off -+ * the archived object name. SO... we shortened the name of this -+ * source file, and changed the makefile. -+ */ -+ - /* Parse a vax operand in DEC assembler notation. - For speed, expect a string of whitespace to be reduced to a single ' '. - This is the case for GNU AS, and is easy for other DEC-compatible -@@ -3150,7 +3301,7 @@ - if (flag_want_pic && operandP->vop_mode == 8 - && this_add_symbol != NULL) - { -- as_warn (_("Symbol %s used as immediate operand in PIC mode."), -+ as_warn (_("Symbol '%s' used as immediate operand in PIC mode."), - S_GET_NAME (this_add_symbol)); - } - #endif -@@ -3226,7 +3377,15 @@ - length = 4; - } - } -+#ifdef OBJ_ELF -+ if (flag_want_pic && this_add_symbol != NULL) -+ { -+ as_warn (_("Symbol '%s' used as displacement in PIC mode."), -+ S_GET_NAME (this_add_symbol)); -+ } -+#endif - p = frag_more (1 + length); -+ know (operandP->vop_reg != 0xf); - know (operandP->vop_reg >= 0); - p[0] = operandP->vop_reg - | ((at | "?\12\14?\16"[length]) << 4); -diff -rNU3 dist/gas/config/vax-inst.h dist.nbsd/gas/config/vax-inst.h ---- dist/gas/config/vax-inst.h Wed Nov 7 11:43:31 2012 -+++ dist.nbsd/gas/config/vax-inst.h Wed Nov 7 11:13:46 2012 -@@ -66,6 +66,8 @@ - #define VAX_WIDEN_WORD (0x20) /* Add this to byte branch to get word br. */ - #define VAX_WIDEN_LONG (0x6) /* Add this to byte branch to get long jmp.*/ - /* Needs VAX_PC_RELATIVE_MODE byte after it*/ -+#define VAX_CALLS (0xFB) /* Call with arg list on stack */ -+#define VAX_CALLG (0xFA) /* Call with arg list in memory */ - - struct vit /* vax instruction tree */ - { -diff -rNU3 dist/gas/doc/Makefile.am dist.nbsd/gas/doc/Makefile.am ---- dist/gas/doc/Makefile.am Wed Nov 7 11:43:31 2012 -+++ dist.nbsd/gas/doc/Makefile.am Wed Nov 7 11:13:46 2012 -@@ -24,6 +24,8 @@ - -I "$(top_srcdir)/../bfd/doc" -I ../../bfd/doc - - asconfig.texi: $(CONFIG).texi -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_asconfig.text: - rm -f asconfig.texi - cp $(srcdir)/$(CONFIG).texi ./asconfig.texi - chmod u+w ./asconfig.texi -@@ -96,6 +98,8 @@ - # The sed command removes the no-adjust Nroff command so that - # the man output looks standard. - as.1: $(srcdir)/as.texinfo asconfig.texi $(CPU_DOCS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_as.1: - touch $@ - -$(TEXI2POD) $(MANCONF) < $(srcdir)/as.texinfo > as.pod - -($(POD2MAN) as.pod | \ -diff -rNU3 dist/gas/doc/Makefile.in dist.nbsd/gas/doc/Makefile.in ---- dist/gas/doc/Makefile.in Wed Nov 7 11:43:31 2012 -+++ dist.nbsd/gas/doc/Makefile.in Wed Nov 7 11:13:46 2012 -@@ -366,6 +366,8 @@ - -rm -rf .libs _libs - - as.info: as.texinfo $(as_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_as.info: as.texinfo $(as_TEXINFOS) - restore=: && backupdir="$(am__leading_dot)am$$$$" && \ - rm -rf $$backupdir && mkdir $$backupdir && \ - if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ -@@ -748,6 +750,8 @@ - - - asconfig.texi: $(CONFIG).texi -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_asconfig.texi: - rm -f asconfig.texi - cp $(srcdir)/$(CONFIG).texi ./asconfig.texi - chmod u+w ./asconfig.texi -@@ -765,6 +769,8 @@ - # The sed command removes the no-adjust Nroff command so that - # the man output looks standard. - as.1: $(srcdir)/as.texinfo asconfig.texi $(CPU_DOCS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_as.1: - touch $@ - -$(TEXI2POD) $(MANCONF) < $(srcdir)/as.texinfo > as.pod - -($(POD2MAN) as.pod | \ -Binary files dist/gas/doc/as.info and dist.nbsd/gas/doc/as.info differ -diff -rNU3 dist/gas/doc/c-mips.texi dist.nbsd/gas/doc/c-mips.texi ---- dist/gas/doc/c-mips.texi Wed Nov 7 11:43:31 2012 -+++ dist.nbsd/gas/doc/c-mips.texi Wed Nov 7 11:13:46 2012 -@@ -196,6 +196,14 @@ - @itemx -mno-fix-vr4130 - Insert nops to work around the VR4130 @samp{mflo}/@samp{mfhi} errata. - -+@item -mfix-loongson2f-btb -+@itemx -mno-fix-loongson2f-btb -+Clear the Branch Target Buffer before any jump through a register. This -+option is intended to be used on kernel code for the Loongson 2F processor -+only; userland code compiled with this option will fault, and kernel code -+compiled with this option run on another processor than Loongson 2F will -+yield unpredictable results. -+ - @item -mfix-24k - @itemx -no-mfix-24k - Insert nops to work around the 24K @samp{eret}/@samp{deret} errata. -diff -rNU3 dist/gas/remap.c dist.nbsd/gas/remap.c ---- dist/gas/remap.c Wed Nov 7 11:43:31 2012 -+++ dist.nbsd/gas/remap.c Wed Nov 7 11:13:50 2012 -@@ -82,8 +82,8 @@ - return filename; - name = filename + map->old_len; - name_len = strlen (name) + 1; -- s = (char *) alloca (name_len + map->new_len); -+ s = (char *) xmalloc (name_len + map->new_len); - memcpy (s, map->new_prefix, map->new_len); - memcpy (s + map->new_len, name, name_len); -- return xstrdup (s); -+ return s; - } -diff -rNU3 dist/gprof/corefile.c dist.nbsd/gprof/corefile.c ---- dist/gprof/corefile.c Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/gprof/corefile.c Wed Nov 7 11:13:50 2012 -@@ -29,6 +29,8 @@ - #include "corefile.h" - #include "safe-ctype.h" - -+#include -+ - bfd *core_bfd; - static int core_num_syms; - static asymbol **core_syms; -diff -rNU3 dist/gprof/gprof.1 dist.nbsd/gprof/gprof.1 ---- dist/gprof/gprof.1 Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/gprof/gprof.1 Wed Nov 7 11:13:50 2012 -@@ -1,15 +1,7 @@ --.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05) -+.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) - .\" - .\" Standard preamble: - .\" ======================================================================== --.de Sh \" Subsection heading --.br --.if t .Sp --.ne 5 --.PP --\fB\\$1\fR --.PP --.. - .de Sp \" Vertical space (when we can't use .PP) - .if t .sp .5v - .if n .sp -@@ -53,7 +45,7 @@ - .el .ds Aq ' - .\" - .\" If the F register is turned on, we'll generate index entries on stderr for --.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index -+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index - .\" entries marked with X<> in POD. Of course, you'll have to process the - .\" output yourself in some meaningful fashion. - .ie \nF \{\ -@@ -132,7 +124,7 @@ - .\" ======================================================================== - .\" - .IX Title "GPROF 1" --.TH GPROF 1 "2011-06-27" "binutils-2.21.1" "GNU" -+.TH GPROF 1 "2011-09-24" "binutils-2.21.1" "GNU" - .\" For nroff, turn off justification. Always turn off hyphenation; it makes - .\" way too many mistakes in technical documents. - .if n .ad l -@@ -475,7 +467,7 @@ - compilers have different mangling styles. The optional demangling style - argument can be used to choose an appropriate demangling style for your - compiler. --.Sh "Analysis Options" -+.SS "Analysis Options" - .IX Subsection "Analysis Options" - .ie n .IP """\-a""" 4 - .el .IP "\f(CW\-a\fR" 4 -@@ -604,7 +596,7 @@ - functions in the flat profile, even those that were never called, and - that had no time spent in them. This is useful in conjunction with the - \&\fB\-c\fR option for discovering which routines were never called. --.Sh "Miscellaneous Options" -+.SS "Miscellaneous Options" - .IX Subsection "Miscellaneous Options" - .ie n .IP """\-d[\f(CInum\f(CW]""" 4 - .el .IP "\f(CW\-d[\f(CInum\f(CW]\fR" 4 -@@ -663,7 +655,7 @@ - .PD - The \fB\-v\fR flag causes \f(CW\*(C`gprof\*(C'\fR to print the current version - number, and then exit. --.Sh "Deprecated Options" -+.SS "Deprecated Options" - .IX Subsection "Deprecated Options" - These options have been replaced with newer versions that use symspecs. - .ie n .IP """\-e \f(CIfunction_name\f(CW""" 4 -diff -rNU3 dist/gprof/gprof.c dist.nbsd/gprof/gprof.c ---- dist/gprof/gprof.c Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/gprof/gprof.c Wed Nov 7 11:13:50 2012 -@@ -47,6 +47,8 @@ - - static void usage (FILE *, int) ATTRIBUTE_NORETURN; - -+#include -+ - const char * whoami; - const char * function_mapping_file; - static const char * external_symbol_table; -Binary files dist/gprof/gprof.info and dist.nbsd/gprof/gprof.info differ -diff -rNU3 dist/include/bfdlink.h dist.nbsd/include/bfdlink.h ---- dist/include/bfdlink.h Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/include/bfdlink.h Wed Nov 7 11:13:45 2012 -@@ -403,6 +403,10 @@ - option). If this is NULL, no symbols are being wrapped. */ - struct bfd_hash_table *wrap_hash; - -+ /* Hash table of symbols which may be left unresolved during -+ a link. If this is NULL, no symbols can be left unresolved. */ -+ struct bfd_hash_table *ignore_hash; -+ - /* The output BFD. */ - bfd *output_bfd; - -diff -rNU3 dist/include/opcode/mips.h dist.nbsd/include/opcode/mips.h ---- dist/include/opcode/mips.h Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/include/opcode/mips.h Wed Nov 7 11:13:45 2012 -@@ -768,7 +768,11 @@ - M_DSUB_I, - M_DSUBU_I, - M_DSUBU_I_2, -+ M_JR_S, -+ M_J_S, - M_J_A, -+ M_JALR_S, -+ M_JALR_DS, - M_JAL_1, - M_JAL_2, - M_JAL_A, -diff -rNU3 dist/ld/Makefile.am dist.nbsd/ld/Makefile.am ---- dist/ld/Makefile.am Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/ld/Makefile.am Wed Nov 7 11:13:51 2012 -@@ -144,11 +144,13 @@ - earmelf_linux.c \ - earmelf_linux_eabi.c \ - earmelf_nbsd.c \ -+ earmelf_nbsd_eabi.c \ - earmelf_vxworks.c \ - earmelfb.c \ - earmelfb_linux.c \ - earmelfb_linux_eabi.c \ - earmelfb_nbsd.c \ -+ earmelfb_nbsd_eabi.c \ - earmnbsd.c \ - earmnto.c \ - earmpe.c \ -@@ -684,6 +686,11 @@ - $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ - $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} - ${GENSCRIPTS} armelf_nbsd "$(tdir_armelf_nbsd)" -+earmelf_nbsd_abi.c: $(srcdir)/emulparams/armelf_nbsd_abi.sh \ -+ $(srcdir)/emulparams/armelf.sh \ -+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ -+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} armelf_nbsd_abi "$(tdir_armelf_nbsd_abi)" - earmelf_vxworks.c: $(srcdir)/emulparams/armelf_vxworks.sh \ - $(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/armelf.sh \ - $(ELF_DEPS) $(srcdir)/emultempl/vxworks.em \ -@@ -711,6 +718,12 @@ - $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ - $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} - ${GENSCRIPTS} armelfb_nbsd "$(tdir_armelfb_nbsd)" -+earmelfb_nbsd_abi.c: $(srcdir)/emulparams/armelfb_nbsd_abi.sh \ -+ $(srcdir)/emulparams/armelf_nbsd_abi.sh \ -+ $(srcdir)/emulparams/armelf.sh \ -+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ -+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} armelfb_nbsd_abi "$(tdir_armelfb_nbsd_abi)" - earmnbsd.c: $(srcdir)/emulparams/armnbsd.sh \ - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} - ${GENSCRIPTS} armnbsd "$(tdir_armnbsd)" -@@ -2009,6 +2022,8 @@ - # because almost all configs use "gen" version of manual. - # Set DOCVER above to change. - configdoc.texi: ${DOCVER}-doc.texi -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_configdoc.texi: - cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi - chmod u+w ./configdoc.texi - -@@ -2016,6 +2031,8 @@ - # The sed command removes the no-adjust Nroff command so that - # the man output looks standard. - ld.1: $(srcdir)/ld.texinfo configdoc.texi -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_ld.1: - touch $@ - -$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texinfo > ld.pod - -($(POD2MAN) ld.pod | \ -diff -rNU3 dist/ld/Makefile.in dist.nbsd/ld/Makefile.in ---- dist/ld/Makefile.in Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/ld/Makefile.in Wed Nov 7 11:13:51 2012 -@@ -449,11 +449,13 @@ - earmelf_linux.c \ - earmelf_linux_eabi.c \ - earmelf_nbsd.c \ -+ earmelf_nbsd_eabi.c \ - earmelf_vxworks.c \ - earmelfb.c \ - earmelfb_linux.c \ - earmelfb_linux_eabi.c \ - earmelfb_nbsd.c \ -+ earmelfb_nbsd_eabi.c \ - earmnbsd.c \ - earmnto.c \ - earmpe.c \ -@@ -1031,11 +1033,13 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux_eabi.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nbsd.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nbsd_abi.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_vxworks.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_linux.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_linux_eabi.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_nbsd.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_nbsd_eabi.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmnbsd.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmnto.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmpe.Po@am__quote@ -@@ -1415,6 +1419,8 @@ - -rm -f libtool config.lt - - ld.info: ld.texinfo $(ld_TEXINFOS) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_ld.info: ld.texinfo $(ld_TEXINFOS) - restore=: && backupdir="$(am__leading_dot)am$$$$" && \ - rm -rf $$backupdir && mkdir $$backupdir && \ - if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ -@@ -2119,6 +2125,11 @@ - $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ - $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} - ${GENSCRIPTS} armelf_nbsd "$(tdir_armelf_nbsd)" -+earmelf_nbsd_eabi.c: $(srcdir)/emulparams/armelf_nbsd_eabi.sh \ -+ $(srcdir)/emulparams/armelf.sh \ -+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ -+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} armelf_nbsd_eabi "$(tdir_armelf_nbsd_eabi)" - earmelf_vxworks.c: $(srcdir)/emulparams/armelf_vxworks.sh \ - $(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/armelf.sh \ - $(ELF_DEPS) $(srcdir)/emultempl/vxworks.em \ -@@ -2146,6 +2157,12 @@ - $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ - $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} - ${GENSCRIPTS} armelfb_nbsd "$(tdir_armelfb_nbsd)" -+earmelfb_nbsd_eabi.c: $(srcdir)/emulparams/armelfb_nbsd_eabi.sh \ -+ $(srcdir)/emulparams/armelf_nbsd_eabi.sh \ -+ $(srcdir)/emulparams/armelf.sh \ -+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ -+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} armelfb_nbsd_eabi "$(tdir_armelfb_nbsd_eabi)" - earmnbsd.c: $(srcdir)/emulparams/armnbsd.sh \ - $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} - ${GENSCRIPTS} armnbsd "$(tdir_armnbsd)" -@@ -3387,6 +3404,8 @@ - # because almost all configs use "gen" version of manual. - # Set DOCVER above to change. - configdoc.texi: ${DOCVER}-doc.texi -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_configdoc.texi: - cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi - chmod u+w ./configdoc.texi - -@@ -3394,6 +3413,8 @@ - # The sed command removes the no-adjust Nroff command so that - # the man output looks standard. - ld.1: $(srcdir)/ld.texinfo configdoc.texi -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_ld.1: - touch $@ - -$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texinfo > ld.pod - -($(POD2MAN) ld.pod | \ -diff -rNU3 dist/ld/configure.tgt dist.nbsd/ld/configure.tgt ---- dist/ld/configure.tgt Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/ld/configure.tgt Wed Nov 7 11:13:51 2012 -@@ -56,6 +56,11 @@ - arm-*-freebsd* | arm-*-kfreebsd*-gnu) - targ_emul=armelf_fbsd - targ_extra_emuls="armelf" ;; -+armeb-*-netbsdelf*-eabi*) -+ targ_emul=armelfb_nbsd_eabi; -+ targ_extra_emuls="armelf_nbsd_eabi armelf armnbsd" ;; -+arm-*-netbsdelf*-eabi*) targ_emul=armelf_nbsd_eabi; -+ targ_extra_emuls="armelfb_nbsd_eabi armelf armnbsd" ;; - armeb-*-netbsdelf*) targ_emul=armelfb_nbsd; - targ_extra_emuls="armelf_nbsd armelf armnbsd" ;; - arm-*-netbsdelf*) targ_emul=armelf_nbsd; -@@ -379,12 +384,18 @@ - mips*-sgi-irix*) targ_emul=mipsbig ;; - mips*el-*-ecoff*) targ_emul=mipsidtl ;; - mips*-*-ecoff*) targ_emul=mipsidt ;; -+mips64*el-*-netbsd*) targ_emul=elf32ltsmipn32 -+ targ_extra_emuls="elf64btsmip elf64ltsmip elf32ltsmip elf32btsmipn32 elf32btsmip" -+ ;; -+mips64*-*-netbsd*) targ_emul=elf32btsmipn32 -+ targ_extra_emuls="elf64ltsmip elf64btsmip elf32btsmip elf32ltsmipn32 elf32ltsmip" -+ ;; - mips*el-*-netbsd*) targ_emul=elf32ltsmip - targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip" - ;; - mips*-*-netbsd*) targ_emul=elf32btsmip - targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip" -- ;; -+ ;; - mips*-*-bsd*) targ_emul=mipsbig ;; - mips*vr4300el-*-elf*) targ_emul=elf32l4300 ;; - mips*vr4300-*-elf*) targ_emul=elf32b4300 ;; -@@ -600,10 +611,15 @@ - tdir_sparclinux=${targ_alias}aout - tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'` - tdir_sun4=sparc-sun-sunos4 ;; --sparc64-*-netbsd* | sparc64-*-openbsd*) -- targ_emul=elf64_sparc -- targ_extra_emuls="elf32_sparc" ;; --sparc*-*-netbsd*elf*) targ_emul=elf32_sparc ;; -+sparc64-*-netbsd*) targ_emul=elf64_sparc -+ targ_extra_emuls="elf32_sparc sparcnbsd" -+ ;; -+sparc64-*-openbsd*) targ_emul=elf64_sparc -+ targ_extra_emuls="elf32_sparc" -+ ;; -+sparc*-*-netbsd*elf*) targ_emul=elf32_sparc -+ targ_extra_emuls=sparcnbsd -+ ;; - sparc*-*-netbsd*) targ_emul=sparcnbsd ;; - sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*) - targ_emul=elf32_sparc_sol2 -diff -rNU3 dist/ld/emulparams/armelf_nbsd.sh dist.nbsd/ld/emulparams/armelf_nbsd.sh ---- dist/ld/emulparams/armelf_nbsd.sh Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/ld/emulparams/armelf_nbsd.sh Wed Nov 7 11:13:50 2012 -@@ -3,5 +3,12 @@ - TEXT_START_ADDR=0x00008000 - TARGET2_TYPE=got-rel - -+unset DATA_START_SYMBOLS - unset STACK_ADDR - unset EMBEDDED -+ -+case "$target" in -+ arm*-*-netbsdelf*-eabi*) -+ LIB_PATH='=/usr/lib/oabi' -+ ;; -+esac -diff -rNU3 dist/ld/emulparams/armelf_nbsd_eabi.sh dist.nbsd/ld/emulparams/armelf_nbsd_eabi.sh ---- dist/ld/emulparams/armelf_nbsd_eabi.sh Thu Jan 1 00:00:00 1970 -+++ dist.nbsd/ld/emulparams/armelf_nbsd_eabi.sh Wed Nov 7 11:13:50 2012 -@@ -0,0 +1,18 @@ -+. ${srcdir}/emulparams/armelf_nbsd.sh -+ -+# Use the ARM ABI-compliant exception-handling sections. -+OTHER_READONLY_SECTIONS=" -+ .ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) } -+ ${RELOCATING+ PROVIDE_HIDDEN (__exidx_start = .); } -+ .ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) } -+ ${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }" -+ -+unset LIB_PATH -+ -+case "$target" in -+ arm*-*-netbsdelf*-eabi*) -+ ;; -+ arm*-*-netbsdelf*) -+ LIB_PATH='=/usr/lib/eabi' -+ ;; -+esac -diff -rNU3 dist/ld/emulparams/armelfb_nbsd_eabi.sh dist.nbsd/ld/emulparams/armelfb_nbsd_eabi.sh ---- dist/ld/emulparams/armelfb_nbsd_eabi.sh Thu Jan 1 00:00:00 1970 -+++ dist.nbsd/ld/emulparams/armelfb_nbsd_eabi.sh Wed Nov 7 11:13:50 2012 -@@ -0,0 +1,2 @@ -+. ${srcdir}/emulparams/armelf_nbsd_eabi.sh -+OUTPUT_FORMAT="elf32-bigarm" -diff -rNU3 dist/ld/emulparams/elf32_sparc.sh dist.nbsd/ld/emulparams/elf32_sparc.sh ---- dist/ld/emulparams/elf32_sparc.sh Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/ld/emulparams/elf32_sparc.sh Wed Nov 7 11:13:50 2012 -@@ -13,6 +13,7 @@ - TEMPLATE_NAME=elf32 - DATA_PLT= - GENERATE_SHLIB_SCRIPT=yes -+#ELFSIZE=32 - GENERATE_PIE_SCRIPT=yes - NOP=0x01000000 - NO_SMALL_DATA=yes -diff -rNU3 dist/ld/emulparams/elf32bmipn32-defs.sh dist.nbsd/ld/emulparams/elf32bmipn32-defs.sh ---- dist/ld/emulparams/elf32bmipn32-defs.sh Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/ld/emulparams/elf32bmipn32-defs.sh Wed Nov 7 11:13:50 2012 -@@ -6,6 +6,7 @@ - - # Handle both big- and little-ended 32-bit MIPS objects. - ARCH=mips -+MACHINE= - OUTPUT_FORMAT="elf32-bigmips" - BIG_OUTPUT_FORMAT="elf32-bigmips" - LITTLE_OUTPUT_FORMAT="elf32-littlemips" -diff -rNU3 dist/ld/emulparams/elf64alpha_nbsd.sh dist.nbsd/ld/emulparams/elf64alpha_nbsd.sh ---- dist/ld/emulparams/elf64alpha_nbsd.sh Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/ld/emulparams/elf64alpha_nbsd.sh Wed Nov 7 11:13:50 2012 -@@ -1,2 +1,8 @@ - . ${srcdir}/emulparams/elf64alpha.sh - ENTRY=__start -+ -+NOP=0x47ff041f -+# XXX binutils 2.13 -+# Note that the number is always big-endian, thus we have to -+# reverse the digit string. -+#NOP=0x0000fe2f1f04ff47 # unop; nop -diff -rNU3 dist/ld/emulparams/elf_i386.sh dist.nbsd/ld/emulparams/elf_i386.sh ---- dist/ld/emulparams/elf_i386.sh Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/ld/emulparams/elf_i386.sh Wed Nov 7 11:13:50 2012 -@@ -9,7 +9,14 @@ - NOP=0x90909090 - TEMPLATE_NAME=elf32 - GENERATE_SHLIB_SCRIPT=yes -+#ELFSIZE=32 - GENERATE_PIE_SCRIPT=yes - NO_SMALL_DATA=yes - SEPARATE_GOTPLT=12 - IREL_IN_PLT= -+ -+case "$target" in -+ x86_64-*-netbsd*) -+ LIB_PATH='=/usr/lib/i386' -+ ;; -+esac -diff -rNU3 dist/ld/emulparams/hppalinux.sh dist.nbsd/ld/emulparams/hppalinux.sh ---- dist/ld/emulparams/hppalinux.sh Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/ld/emulparams/hppalinux.sh Wed Nov 7 11:13:50 2012 -@@ -1,5 +1,5 @@ - # If you change this file, please also look at files which source this one: --# hppanbsd.sh -+# hppanbsd.sh hppaobsd.sh - - SCRIPT_NAME=elf - ELFSIZE=32 -diff -rNU3 dist/ld/emulparams/hppaobsd.sh dist.nbsd/ld/emulparams/hppaobsd.sh ---- dist/ld/emulparams/hppaobsd.sh Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/ld/emulparams/hppaobsd.sh Wed Nov 7 11:13:50 2012 -@@ -1,4 +1,4 @@ --. ${srcdir}/emulparams/hppanbsd.sh -+. ${srcdir}/emulparams/hppalinux.sh - - OUTPUT_FORMAT="elf32-hppa" - TEXT_START_ADDR=0x1000 -diff -rNU3 dist/ld/emulparams/m68kelf.sh dist.nbsd/ld/emulparams/m68kelf.sh ---- dist/ld/emulparams/m68kelf.sh Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/ld/emulparams/m68kelf.sh Wed Nov 7 11:13:50 2012 -@@ -10,5 +10,6 @@ - TEMPLATE_NAME=elf32 - EXTRA_EM_FILE=m68kelf - GENERATE_SHLIB_SCRIPT=yes -+ELFSIZE=32 - GENERATE_PIE_SCRIPT=yes - NO_SMALL_DATA=yes -diff -rNU3 dist/ld/emulparams/m68kelfnbsd.sh dist.nbsd/ld/emulparams/m68kelfnbsd.sh ---- dist/ld/emulparams/m68kelfnbsd.sh Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/ld/emulparams/m68kelfnbsd.sh Wed Nov 7 11:13:50 2012 -@@ -1,4 +1,4 @@ - . ${srcdir}/emulparams/m68kelf.sh - TEXT_START_ADDR=0x2000 - TARGET_PAGE_SIZE=0x2000 --MACHINE= -+NONPAGED_TEXT_START_ADDR=${TEXT_START_ADDR} -diff -rNU3 dist/ld/emulparams/sh.sh dist.nbsd/ld/emulparams/sh.sh ---- dist/ld/emulparams/sh.sh Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/ld/emulparams/sh.sh Wed Nov 7 11:13:50 2012 -@@ -3,6 +3,6 @@ - - SCRIPT_NAME=sh - OUTPUT_FORMAT="coff-sh" --TEXT_START_ADDR=0x8000 --TARGET_PAGE_SIZE=128 -+TEXT_START_ADDR=0x1000 -+TARGET_PAGE_SIZE=0x1000 - ARCH=sh -diff -rNU3 dist/ld/emulparams/shelf_nbsd.sh dist.nbsd/ld/emulparams/shelf_nbsd.sh ---- dist/ld/emulparams/shelf_nbsd.sh Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/ld/emulparams/shelf_nbsd.sh Wed Nov 7 11:13:50 2012 -@@ -9,7 +9,11 @@ - - DATA_START_SYMBOLS='PROVIDE (__data_start = .);'; - --ENTRY=_start -+ENTRY=__start - - unset EMBEDDED - unset OTHER_SECTIONS -+ -+OTHER_READWRITE_SECTIONS=' -+ .note.ABI-tag : { *(.note.ABI-tag) } -+' -diff -rNU3 dist/ld/ldlex.c dist.nbsd/ld/ldlex.c ---- dist/ld/ldlex.c Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/ld/ldlex.c Wed Nov 7 11:13:50 2012 -@@ -16,6 +16,9 @@ - /* First, we deal with platform-specific or compiler-specific issues. */ - - /* begin standard C headers. */ -+#ifdef _LIBC -+#include "namespace.h" -+#endif - #include - #include - #include -@@ -23,6 +26,8 @@ - - /* end standard C headers. */ - -+/* $NetBSD: ldlex.c,v 1.2 2011/09/25 04:32:43 christos Exp $ */ -+ - /* flex integer type definitions */ - - #ifndef FLEXINT_H -@@ -152,13 +157,8 @@ - typedef struct yy_buffer_state *YY_BUFFER_STATE; - #endif - --#ifndef YY_TYPEDEF_YY_SIZE_T --#define YY_TYPEDEF_YY_SIZE_T --typedef size_t yy_size_t; --#endif -+extern int yyleng; - --extern yy_size_t yyleng; -- - extern FILE *yyin, *yyout; - - #define EOB_ACT_CONTINUE_SCAN 0 -@@ -183,6 +183,11 @@ - - #define unput(c) yyunput( c, (yytext_ptr) ) - -+#ifndef YY_TYPEDEF_YY_SIZE_T -+#define YY_TYPEDEF_YY_SIZE_T -+typedef size_t yy_size_t; -+#endif -+ - #ifndef YY_STRUCT_YY_BUFFER_STATE - #define YY_STRUCT_YY_BUFFER_STATE - struct yy_buffer_state -@@ -200,7 +205,7 @@ - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ -- yy_size_t yy_n_chars; -+ int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to -@@ -270,8 +275,8 @@ - - /* yy_hold_char holds the character lost when yytext is formed. */ - static char yy_hold_char; --static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ --yy_size_t yyleng; -+static int yy_n_chars; /* number of characters read into yy_ch_buf */ -+int yyleng; - - /* Points to current character in buffer. */ - static char *yy_c_buf_p = (char *) 0; -@@ -299,7 +304,7 @@ - - YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); - YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); --YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); -+YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); - - void *yyalloc (yy_size_t ); - void *yyrealloc (void *,yy_size_t ); -@@ -347,6 +352,9 @@ - static yy_state_type yy_get_previous_state (void ); - static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); - static int yy_get_next_buffer (void ); -+#if defined(__GNUC__) && __GNUC__ >= 3 -+__attribute__((__noreturn__)) -+#endif - static void yy_fatal_error (yyconst char msg[] ); - - /* Done after the current pattern has been matched and before the -@@ -1621,10 +1629,6 @@ - #undef YY_INPUT - #define YY_INPUT(buf,result,max_size) result = yy_input (buf, max_size) - --#ifndef YY_NO_UNPUT --#define YY_NO_UNPUT --#endif -- - #define MAX_INCLUDE_DEPTH 10 - static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH]; - static const char *file_name_stack[MAX_INCLUDE_DEPTH]; -@@ -1660,7 +1664,7 @@ - - - --#line 1664 "ldlex.c" -+#line 1668 "ldlex.c" - - #define INITIAL 0 - #define SCRIPT 1 -@@ -1701,19 +1705,19 @@ - - FILE *yyget_in (void ); - --void yyset_in (FILE * in_str ); -+void yyset_in (FILE * _in_str ); - - FILE *yyget_out (void ); - --void yyset_out (FILE * out_str ); -+void yyset_out (FILE * _out_str ); - --yy_size_t yyget_leng (void ); -+int yyget_leng (void ); - - char *yyget_text (void ); - - int yyget_lineno (void ); - --void yyset_lineno (int line_number ); -+void yyset_lineno (int _line_number ); - - /* Macros after this point can all be overridden by user definitions in - * section 1. -@@ -1727,6 +1731,10 @@ - #endif - #endif - -+#ifndef YY_NO_UNPUT -+ -+#endif -+ - #ifndef yytext_ptr - static void yy_flex_strncpy (char *,yyconst char *,int ); - #endif -@@ -1766,7 +1774,7 @@ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ -- yy_size_t n; \ -+ size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ -@@ -1848,7 +1856,7 @@ - register char *yy_cp, *yy_bp; - register int yy_act; - --#line 120 "ldlex.l" -+#line 118 "ldlex.l" - - - if (parser_input != input_selected) -@@ -1867,7 +1875,7 @@ - } - } - --#line 1871 "ldlex.c" -+#line 1879 "ldlex.c" - - if ( !(yy_init) ) - { -@@ -1952,32 +1960,32 @@ - - case 1: - YY_RULE_SETUP --#line 138 "ldlex.l" -+#line 136 "ldlex.l" - { comment (); } - YY_BREAK - case 2: - YY_RULE_SETUP --#line 141 "ldlex.l" -+#line 139 "ldlex.l" - { RTOKEN('-');} - YY_BREAK - case 3: - YY_RULE_SETUP --#line 142 "ldlex.l" -+#line 140 "ldlex.l" - { RTOKEN('+');} - YY_BREAK - case 4: - YY_RULE_SETUP --#line 143 "ldlex.l" -+#line 141 "ldlex.l" - { yylval.name = xstrdup (yytext); return NAME; } - YY_BREAK - case 5: - YY_RULE_SETUP --#line 144 "ldlex.l" -+#line 142 "ldlex.l" - { RTOKEN('='); } - YY_BREAK - case 6: - YY_RULE_SETUP --#line 146 "ldlex.l" -+#line 144 "ldlex.l" - { - yylval.integer = bfd_scan_vma (yytext + 1, 0, 16); - yylval.bigint.str = NULL; -@@ -1986,7 +1994,7 @@ - YY_BREAK - case 7: - YY_RULE_SETUP --#line 152 "ldlex.l" -+#line 150 "ldlex.l" - { - int ibase ; - switch (yytext[yyleng - 1]) { -@@ -2015,7 +2023,7 @@ - YY_BREAK - case 8: - YY_RULE_SETUP --#line 177 "ldlex.l" -+#line 175 "ldlex.l" - { - char *s = yytext; - int ibase = 0; -@@ -2048,794 +2056,794 @@ - YY_BREAK - case 9: - YY_RULE_SETUP --#line 206 "ldlex.l" -+#line 204 "ldlex.l" - { RTOKEN(']');} - YY_BREAK - case 10: - YY_RULE_SETUP --#line 207 "ldlex.l" -+#line 205 "ldlex.l" - { RTOKEN('[');} - YY_BREAK - case 11: - YY_RULE_SETUP --#line 208 "ldlex.l" -+#line 206 "ldlex.l" - { RTOKEN(LSHIFTEQ);} - YY_BREAK - case 12: - YY_RULE_SETUP --#line 209 "ldlex.l" -+#line 207 "ldlex.l" - { RTOKEN(RSHIFTEQ);} - YY_BREAK - case 13: - YY_RULE_SETUP --#line 210 "ldlex.l" -+#line 208 "ldlex.l" - { RTOKEN(OROR);} - YY_BREAK - case 14: - YY_RULE_SETUP --#line 211 "ldlex.l" -+#line 209 "ldlex.l" - { RTOKEN(EQ);} - YY_BREAK - case 15: - YY_RULE_SETUP --#line 212 "ldlex.l" -+#line 210 "ldlex.l" - { RTOKEN(NE);} - YY_BREAK - case 16: - YY_RULE_SETUP --#line 213 "ldlex.l" -+#line 211 "ldlex.l" - { RTOKEN(GE);} - YY_BREAK - case 17: - YY_RULE_SETUP --#line 214 "ldlex.l" -+#line 212 "ldlex.l" - { RTOKEN(LE);} - YY_BREAK - case 18: - YY_RULE_SETUP --#line 215 "ldlex.l" -+#line 213 "ldlex.l" - { RTOKEN(LSHIFT);} - YY_BREAK - case 19: - YY_RULE_SETUP --#line 216 "ldlex.l" -+#line 214 "ldlex.l" - { RTOKEN(RSHIFT);} - YY_BREAK - case 20: - YY_RULE_SETUP --#line 217 "ldlex.l" -+#line 215 "ldlex.l" - { RTOKEN(PLUSEQ);} - YY_BREAK - case 21: - YY_RULE_SETUP --#line 218 "ldlex.l" -+#line 216 "ldlex.l" - { RTOKEN(MINUSEQ);} - YY_BREAK - case 22: - YY_RULE_SETUP --#line 219 "ldlex.l" -+#line 217 "ldlex.l" - { RTOKEN(MULTEQ);} - YY_BREAK - case 23: - YY_RULE_SETUP --#line 220 "ldlex.l" -+#line 218 "ldlex.l" - { RTOKEN(DIVEQ);} - YY_BREAK - case 24: - YY_RULE_SETUP --#line 221 "ldlex.l" -+#line 219 "ldlex.l" - { RTOKEN(ANDEQ);} - YY_BREAK - case 25: - YY_RULE_SETUP --#line 222 "ldlex.l" -+#line 220 "ldlex.l" - { RTOKEN(OREQ);} - YY_BREAK - case 26: - YY_RULE_SETUP --#line 223 "ldlex.l" -+#line 221 "ldlex.l" - { RTOKEN(ANDAND);} - YY_BREAK - case 27: - YY_RULE_SETUP --#line 224 "ldlex.l" -+#line 222 "ldlex.l" - { RTOKEN('>');} - YY_BREAK - case 28: - YY_RULE_SETUP --#line 225 "ldlex.l" -+#line 223 "ldlex.l" - { RTOKEN(',');} - YY_BREAK - case 29: - YY_RULE_SETUP --#line 226 "ldlex.l" -+#line 224 "ldlex.l" - { RTOKEN('&');} - YY_BREAK - case 30: - YY_RULE_SETUP --#line 227 "ldlex.l" -+#line 225 "ldlex.l" - { RTOKEN('|');} - YY_BREAK - case 31: - YY_RULE_SETUP --#line 228 "ldlex.l" -+#line 226 "ldlex.l" - { RTOKEN('~');} - YY_BREAK - case 32: - YY_RULE_SETUP --#line 229 "ldlex.l" -+#line 227 "ldlex.l" - { RTOKEN('!');} - YY_BREAK - case 33: - YY_RULE_SETUP --#line 230 "ldlex.l" -+#line 228 "ldlex.l" - { RTOKEN('?');} - YY_BREAK - case 34: - YY_RULE_SETUP --#line 231 "ldlex.l" -+#line 229 "ldlex.l" - { RTOKEN('*');} - YY_BREAK - case 35: - YY_RULE_SETUP --#line 232 "ldlex.l" -+#line 230 "ldlex.l" - { RTOKEN('+');} - YY_BREAK - case 36: - YY_RULE_SETUP --#line 233 "ldlex.l" -+#line 231 "ldlex.l" - { RTOKEN('-');} - YY_BREAK - case 37: - YY_RULE_SETUP --#line 234 "ldlex.l" -+#line 232 "ldlex.l" - { RTOKEN('/');} - YY_BREAK - case 38: - YY_RULE_SETUP --#line 235 "ldlex.l" -+#line 233 "ldlex.l" - { RTOKEN('%');} - YY_BREAK - case 39: - YY_RULE_SETUP --#line 236 "ldlex.l" -+#line 234 "ldlex.l" - { RTOKEN('<');} - YY_BREAK - case 40: - YY_RULE_SETUP --#line 237 "ldlex.l" -+#line 235 "ldlex.l" - { RTOKEN('=');} - YY_BREAK - case 41: - YY_RULE_SETUP --#line 238 "ldlex.l" -+#line 236 "ldlex.l" - { RTOKEN('}') ; } - YY_BREAK - case 42: - YY_RULE_SETUP --#line 239 "ldlex.l" -+#line 237 "ldlex.l" - { RTOKEN('{'); } - YY_BREAK - case 43: - YY_RULE_SETUP --#line 240 "ldlex.l" -+#line 238 "ldlex.l" - { RTOKEN(')');} - YY_BREAK - case 44: - YY_RULE_SETUP --#line 241 "ldlex.l" -+#line 239 "ldlex.l" - { RTOKEN('(');} - YY_BREAK - case 45: - YY_RULE_SETUP --#line 242 "ldlex.l" -+#line 240 "ldlex.l" - { RTOKEN(':'); } - YY_BREAK - case 46: - YY_RULE_SETUP --#line 243 "ldlex.l" -+#line 241 "ldlex.l" - { RTOKEN(';');} - YY_BREAK - case 47: - YY_RULE_SETUP --#line 244 "ldlex.l" -+#line 242 "ldlex.l" - { RTOKEN(MEMORY);} - YY_BREAK - case 48: - YY_RULE_SETUP --#line 245 "ldlex.l" -+#line 243 "ldlex.l" - { RTOKEN(REGION_ALIAS);} - YY_BREAK - case 49: - YY_RULE_SETUP --#line 246 "ldlex.l" -+#line 244 "ldlex.l" - { RTOKEN(LD_FEATURE);} - YY_BREAK - case 50: - YY_RULE_SETUP --#line 247 "ldlex.l" -+#line 245 "ldlex.l" - { RTOKEN(ORIGIN);} - YY_BREAK - case 51: - YY_RULE_SETUP --#line 248 "ldlex.l" -+#line 246 "ldlex.l" - { RTOKEN(VERSIONK);} - YY_BREAK - case 52: - YY_RULE_SETUP --#line 249 "ldlex.l" -+#line 247 "ldlex.l" - { RTOKEN(BLOCK);} - YY_BREAK - case 53: - YY_RULE_SETUP --#line 250 "ldlex.l" -+#line 248 "ldlex.l" - { RTOKEN(BIND);} - YY_BREAK - case 54: - YY_RULE_SETUP --#line 251 "ldlex.l" -+#line 249 "ldlex.l" - { RTOKEN(LENGTH);} - YY_BREAK - case 55: - YY_RULE_SETUP --#line 252 "ldlex.l" -+#line 250 "ldlex.l" - { RTOKEN(ALIGN_K);} - YY_BREAK - case 56: - YY_RULE_SETUP --#line 253 "ldlex.l" -+#line 251 "ldlex.l" - { RTOKEN(DATA_SEGMENT_ALIGN);} - YY_BREAK - case 57: - YY_RULE_SETUP --#line 254 "ldlex.l" -+#line 252 "ldlex.l" - { RTOKEN(DATA_SEGMENT_RELRO_END);} - YY_BREAK - case 58: - YY_RULE_SETUP --#line 255 "ldlex.l" -+#line 253 "ldlex.l" - { RTOKEN(DATA_SEGMENT_END);} - YY_BREAK - case 59: - YY_RULE_SETUP --#line 256 "ldlex.l" -+#line 254 "ldlex.l" - { RTOKEN(ADDR);} - YY_BREAK - case 60: - YY_RULE_SETUP --#line 257 "ldlex.l" -+#line 255 "ldlex.l" - { RTOKEN(LOADADDR);} - YY_BREAK - case 61: - YY_RULE_SETUP --#line 258 "ldlex.l" -+#line 256 "ldlex.l" - { RTOKEN(ALIGNOF); } - YY_BREAK - case 62: - YY_RULE_SETUP --#line 259 "ldlex.l" -+#line 257 "ldlex.l" - { RTOKEN(MAX_K); } - YY_BREAK - case 63: - YY_RULE_SETUP --#line 260 "ldlex.l" -+#line 258 "ldlex.l" - { RTOKEN(MIN_K); } - YY_BREAK - case 64: - YY_RULE_SETUP --#line 261 "ldlex.l" -+#line 259 "ldlex.l" - { RTOKEN(ASSERT_K); } - YY_BREAK - case 65: - YY_RULE_SETUP --#line 262 "ldlex.l" -+#line 260 "ldlex.l" - { RTOKEN(ENTRY);} - YY_BREAK - case 66: - YY_RULE_SETUP --#line 263 "ldlex.l" -+#line 261 "ldlex.l" - { RTOKEN(EXTERN);} - YY_BREAK - case 67: - YY_RULE_SETUP --#line 264 "ldlex.l" -+#line 262 "ldlex.l" - { RTOKEN(NEXT);} - YY_BREAK - case 68: - YY_RULE_SETUP --#line 265 "ldlex.l" -+#line 263 "ldlex.l" - { RTOKEN(SIZEOF_HEADERS);} - YY_BREAK - case 69: - YY_RULE_SETUP --#line 266 "ldlex.l" -+#line 264 "ldlex.l" - { RTOKEN(SIZEOF_HEADERS);} - YY_BREAK - case 70: - YY_RULE_SETUP --#line 267 "ldlex.l" -+#line 265 "ldlex.l" - { RTOKEN(SEGMENT_START);} - YY_BREAK - case 71: - YY_RULE_SETUP --#line 268 "ldlex.l" -+#line 266 "ldlex.l" - { RTOKEN(MAP);} - YY_BREAK - case 72: - YY_RULE_SETUP --#line 269 "ldlex.l" -+#line 267 "ldlex.l" - { RTOKEN(SIZEOF);} - YY_BREAK - case 73: - YY_RULE_SETUP --#line 270 "ldlex.l" -+#line 268 "ldlex.l" - { RTOKEN(TARGET_K);} - YY_BREAK - case 74: - YY_RULE_SETUP --#line 271 "ldlex.l" -+#line 269 "ldlex.l" - { RTOKEN(SEARCH_DIR);} - YY_BREAK - case 75: - YY_RULE_SETUP --#line 272 "ldlex.l" -+#line 270 "ldlex.l" - { RTOKEN(OUTPUT);} - YY_BREAK - case 76: - YY_RULE_SETUP --#line 273 "ldlex.l" -+#line 271 "ldlex.l" - { RTOKEN(INPUT);} - YY_BREAK - case 77: - YY_RULE_SETUP --#line 274 "ldlex.l" -+#line 272 "ldlex.l" - { RTOKEN(GROUP);} - YY_BREAK - case 78: - YY_RULE_SETUP --#line 275 "ldlex.l" -+#line 273 "ldlex.l" - { RTOKEN(AS_NEEDED);} - YY_BREAK - case 79: - YY_RULE_SETUP --#line 276 "ldlex.l" -+#line 274 "ldlex.l" - { RTOKEN(DEFINED);} - YY_BREAK - case 80: - YY_RULE_SETUP --#line 277 "ldlex.l" -+#line 275 "ldlex.l" - { RTOKEN(CREATE_OBJECT_SYMBOLS);} - YY_BREAK - case 81: - YY_RULE_SETUP --#line 278 "ldlex.l" -+#line 276 "ldlex.l" - { RTOKEN( CONSTRUCTORS);} - YY_BREAK - case 82: - YY_RULE_SETUP --#line 279 "ldlex.l" -+#line 277 "ldlex.l" - { RTOKEN(FORCE_COMMON_ALLOCATION);} - YY_BREAK - case 83: - YY_RULE_SETUP --#line 280 "ldlex.l" -+#line 278 "ldlex.l" - { RTOKEN(INHIBIT_COMMON_ALLOCATION);} - YY_BREAK - case 84: - YY_RULE_SETUP --#line 281 "ldlex.l" -+#line 279 "ldlex.l" - { RTOKEN(SECTIONS);} - YY_BREAK - case 85: - YY_RULE_SETUP --#line 282 "ldlex.l" -+#line 280 "ldlex.l" - { RTOKEN(INSERT_K);} - YY_BREAK - case 86: - YY_RULE_SETUP --#line 283 "ldlex.l" -+#line 281 "ldlex.l" - { RTOKEN(AFTER);} - YY_BREAK - case 87: - YY_RULE_SETUP --#line 284 "ldlex.l" -+#line 282 "ldlex.l" - { RTOKEN(BEFORE);} - YY_BREAK - case 88: - YY_RULE_SETUP --#line 285 "ldlex.l" -+#line 283 "ldlex.l" - { RTOKEN(FILL);} - YY_BREAK - case 89: - YY_RULE_SETUP --#line 286 "ldlex.l" -+#line 284 "ldlex.l" - { RTOKEN(STARTUP);} - YY_BREAK - case 90: - YY_RULE_SETUP --#line 287 "ldlex.l" -+#line 285 "ldlex.l" - { RTOKEN(OUTPUT_FORMAT);} - YY_BREAK - case 91: - YY_RULE_SETUP --#line 288 "ldlex.l" -+#line 286 "ldlex.l" - { RTOKEN( OUTPUT_ARCH);} - YY_BREAK - case 92: - YY_RULE_SETUP --#line 289 "ldlex.l" -+#line 287 "ldlex.l" - { RTOKEN(HLL);} - YY_BREAK - case 93: - YY_RULE_SETUP --#line 290 "ldlex.l" -+#line 288 "ldlex.l" - { RTOKEN(SYSLIB);} - YY_BREAK - case 94: - YY_RULE_SETUP --#line 291 "ldlex.l" -+#line 289 "ldlex.l" - { RTOKEN(FLOAT);} - YY_BREAK - case 95: - YY_RULE_SETUP --#line 292 "ldlex.l" -+#line 290 "ldlex.l" - { RTOKEN( QUAD);} - YY_BREAK - case 96: - YY_RULE_SETUP --#line 293 "ldlex.l" -+#line 291 "ldlex.l" - { RTOKEN( SQUAD);} - YY_BREAK - case 97: - YY_RULE_SETUP --#line 294 "ldlex.l" -+#line 292 "ldlex.l" - { RTOKEN( LONG);} - YY_BREAK - case 98: - YY_RULE_SETUP --#line 295 "ldlex.l" -+#line 293 "ldlex.l" - { RTOKEN( SHORT);} - YY_BREAK - case 99: - YY_RULE_SETUP --#line 296 "ldlex.l" -+#line 294 "ldlex.l" - { RTOKEN( BYTE);} - YY_BREAK - case 100: - YY_RULE_SETUP --#line 297 "ldlex.l" -+#line 295 "ldlex.l" - { RTOKEN(NOFLOAT);} - YY_BREAK - case 101: - YY_RULE_SETUP --#line 298 "ldlex.l" -+#line 296 "ldlex.l" - { RTOKEN(NOCROSSREFS);} - YY_BREAK - case 102: - YY_RULE_SETUP --#line 299 "ldlex.l" -+#line 297 "ldlex.l" - { RTOKEN(OVERLAY); } - YY_BREAK - case 103: - YY_RULE_SETUP --#line 300 "ldlex.l" -+#line 298 "ldlex.l" - { RTOKEN(SORT_BY_NAME); } - YY_BREAK - case 104: - YY_RULE_SETUP --#line 301 "ldlex.l" -+#line 299 "ldlex.l" - { RTOKEN(SORT_BY_ALIGNMENT); } - YY_BREAK - case 105: - YY_RULE_SETUP --#line 302 "ldlex.l" -+#line 300 "ldlex.l" - { RTOKEN(SORT_BY_NAME); } - YY_BREAK - case 106: - YY_RULE_SETUP --#line 303 "ldlex.l" -+#line 301 "ldlex.l" - { RTOKEN(NOLOAD);} - YY_BREAK - case 107: - YY_RULE_SETUP --#line 304 "ldlex.l" -+#line 302 "ldlex.l" - { RTOKEN(DSECT);} - YY_BREAK - case 108: - YY_RULE_SETUP --#line 305 "ldlex.l" -+#line 303 "ldlex.l" - { RTOKEN(COPY);} - YY_BREAK - case 109: - YY_RULE_SETUP --#line 306 "ldlex.l" -+#line 304 "ldlex.l" - { RTOKEN(INFO);} - YY_BREAK - case 110: - YY_RULE_SETUP --#line 307 "ldlex.l" -+#line 305 "ldlex.l" - { RTOKEN(OVERLAY);} - YY_BREAK - case 111: - YY_RULE_SETUP --#line 308 "ldlex.l" -+#line 306 "ldlex.l" - { RTOKEN(ONLY_IF_RO); } - YY_BREAK - case 112: - YY_RULE_SETUP --#line 309 "ldlex.l" -+#line 307 "ldlex.l" - { RTOKEN(ONLY_IF_RW); } - YY_BREAK - case 113: - YY_RULE_SETUP --#line 310 "ldlex.l" -+#line 308 "ldlex.l" - { RTOKEN(SPECIAL); } - YY_BREAK - case 114: - YY_RULE_SETUP --#line 311 "ldlex.l" -+#line 309 "ldlex.l" - { RTOKEN(ORIGIN);} - YY_BREAK - case 115: - YY_RULE_SETUP --#line 312 "ldlex.l" -+#line 310 "ldlex.l" - { RTOKEN(ORIGIN);} - YY_BREAK - case 116: - YY_RULE_SETUP --#line 313 "ldlex.l" -+#line 311 "ldlex.l" - { RTOKEN( LENGTH);} - YY_BREAK - case 117: - YY_RULE_SETUP --#line 314 "ldlex.l" -+#line 312 "ldlex.l" - { RTOKEN( LENGTH);} - YY_BREAK - case 118: - YY_RULE_SETUP --#line 315 "ldlex.l" -+#line 313 "ldlex.l" - { RTOKEN(INCLUDE);} - YY_BREAK - case 119: - YY_RULE_SETUP --#line 316 "ldlex.l" -+#line 314 "ldlex.l" - { RTOKEN (PHDRS); } - YY_BREAK - case 120: - YY_RULE_SETUP --#line 317 "ldlex.l" -+#line 315 "ldlex.l" - { RTOKEN(AT);} - YY_BREAK - case 121: - YY_RULE_SETUP --#line 318 "ldlex.l" -+#line 316 "ldlex.l" - { RTOKEN(SUBALIGN);} - YY_BREAK - case 122: - YY_RULE_SETUP --#line 319 "ldlex.l" -+#line 317 "ldlex.l" - { RTOKEN(PROVIDE); } - YY_BREAK - case 123: - YY_RULE_SETUP --#line 320 "ldlex.l" -+#line 318 "ldlex.l" - { RTOKEN(PROVIDE_HIDDEN); } - YY_BREAK - case 124: - YY_RULE_SETUP --#line 321 "ldlex.l" -+#line 319 "ldlex.l" - { RTOKEN(KEEP); } - YY_BREAK - case 125: - YY_RULE_SETUP --#line 322 "ldlex.l" -+#line 320 "ldlex.l" - { RTOKEN(EXCLUDE_FILE); } - YY_BREAK - case 126: - YY_RULE_SETUP --#line 323 "ldlex.l" -+#line 321 "ldlex.l" - { RTOKEN(CONSTANT);} - YY_BREAK - case 127: - /* rule 127 can match eol */ - YY_RULE_SETUP --#line 324 "ldlex.l" -+#line 322 "ldlex.l" - { ++ lineno; } - YY_BREAK - case 128: - /* rule 128 can match eol */ - YY_RULE_SETUP --#line 325 "ldlex.l" -+#line 323 "ldlex.l" - { ++ lineno; RTOKEN(NEWLINE); } - YY_BREAK - case 129: - YY_RULE_SETUP --#line 326 "ldlex.l" -+#line 324 "ldlex.l" - { /* Mri comment line */ } - YY_BREAK - case 130: - YY_RULE_SETUP --#line 327 "ldlex.l" -+#line 325 "ldlex.l" - { /* Mri comment line */ } - YY_BREAK - case 131: - YY_RULE_SETUP --#line 328 "ldlex.l" -+#line 326 "ldlex.l" - { RTOKEN(ENDWORD); } - YY_BREAK - case 132: - YY_RULE_SETUP --#line 329 "ldlex.l" -+#line 327 "ldlex.l" - { RTOKEN(ALIGNMOD);} - YY_BREAK - case 133: - YY_RULE_SETUP --#line 330 "ldlex.l" -+#line 328 "ldlex.l" - { RTOKEN(ALIGN_K);} - YY_BREAK - case 134: - YY_RULE_SETUP --#line 331 "ldlex.l" -+#line 329 "ldlex.l" - { RTOKEN(CHIP); } - YY_BREAK - case 135: - YY_RULE_SETUP --#line 332 "ldlex.l" -+#line 330 "ldlex.l" - { RTOKEN(BASE); } - YY_BREAK - case 136: - YY_RULE_SETUP --#line 333 "ldlex.l" -+#line 331 "ldlex.l" - { RTOKEN(ALIAS); } - YY_BREAK - case 137: - YY_RULE_SETUP --#line 334 "ldlex.l" -+#line 332 "ldlex.l" - { RTOKEN(TRUNCATE); } - YY_BREAK - case 138: - YY_RULE_SETUP --#line 335 "ldlex.l" -+#line 333 "ldlex.l" - { RTOKEN(LOAD); } - YY_BREAK - case 139: - YY_RULE_SETUP --#line 336 "ldlex.l" -+#line 334 "ldlex.l" - { RTOKEN(PUBLIC); } - YY_BREAK - case 140: - YY_RULE_SETUP --#line 337 "ldlex.l" -+#line 335 "ldlex.l" - { RTOKEN(ORDER); } - YY_BREAK - case 141: - YY_RULE_SETUP --#line 338 "ldlex.l" -+#line 336 "ldlex.l" - { RTOKEN(NAMEWORD); } - YY_BREAK - case 142: - YY_RULE_SETUP --#line 339 "ldlex.l" -+#line 337 "ldlex.l" - { RTOKEN(FORMAT); } - YY_BREAK - case 143: - YY_RULE_SETUP --#line 340 "ldlex.l" -+#line 338 "ldlex.l" - { RTOKEN(CASE); } - YY_BREAK - case 144: - YY_RULE_SETUP --#line 341 "ldlex.l" -+#line 339 "ldlex.l" - { RTOKEN(START); } - YY_BREAK - case 145: - YY_RULE_SETUP --#line 342 "ldlex.l" -+#line 340 "ldlex.l" - { RTOKEN(LIST); /* LIST and ignore to end of line */ } - YY_BREAK - case 146: - YY_RULE_SETUP --#line 343 "ldlex.l" -+#line 341 "ldlex.l" - { RTOKEN(SECT); } - YY_BREAK - case 147: - YY_RULE_SETUP --#line 344 "ldlex.l" -+#line 342 "ldlex.l" - { RTOKEN(ABSOLUTE); } - YY_BREAK - case 148: - YY_RULE_SETUP --#line 345 "ldlex.l" -+#line 343 "ldlex.l" - { RTOKEN(ENDWORD); } - YY_BREAK - case 149: - YY_RULE_SETUP --#line 346 "ldlex.l" -+#line 344 "ldlex.l" - { RTOKEN(ALIGNMOD);} - YY_BREAK - case 150: - YY_RULE_SETUP --#line 347 "ldlex.l" -+#line 345 "ldlex.l" - { RTOKEN(ALIGN_K);} - YY_BREAK - case 151: - YY_RULE_SETUP --#line 348 "ldlex.l" -+#line 346 "ldlex.l" - { RTOKEN(CHIP); } - YY_BREAK - case 152: - YY_RULE_SETUP --#line 349 "ldlex.l" -+#line 347 "ldlex.l" - { RTOKEN(BASE); } - YY_BREAK - case 153: - YY_RULE_SETUP --#line 350 "ldlex.l" -+#line 348 "ldlex.l" - { RTOKEN(ALIAS); } - YY_BREAK - case 154: - YY_RULE_SETUP --#line 351 "ldlex.l" -+#line 349 "ldlex.l" - { RTOKEN(TRUNCATE); } - YY_BREAK - case 155: - YY_RULE_SETUP --#line 352 "ldlex.l" -+#line 350 "ldlex.l" - { RTOKEN(LOAD); } - YY_BREAK - case 156: - YY_RULE_SETUP --#line 353 "ldlex.l" -+#line 351 "ldlex.l" - { RTOKEN(PUBLIC); } - YY_BREAK - case 157: - YY_RULE_SETUP --#line 354 "ldlex.l" -+#line 352 "ldlex.l" - { RTOKEN(ORDER); } - YY_BREAK - case 158: - YY_RULE_SETUP --#line 355 "ldlex.l" -+#line 353 "ldlex.l" - { RTOKEN(NAMEWORD); } - YY_BREAK - case 159: - YY_RULE_SETUP --#line 356 "ldlex.l" -+#line 354 "ldlex.l" - { RTOKEN(FORMAT); } - YY_BREAK - case 160: - YY_RULE_SETUP --#line 357 "ldlex.l" -+#line 355 "ldlex.l" - { RTOKEN(CASE); } - YY_BREAK - case 161: - YY_RULE_SETUP --#line 358 "ldlex.l" -+#line 356 "ldlex.l" - { RTOKEN(EXTERN); } - YY_BREAK - case 162: - YY_RULE_SETUP --#line 359 "ldlex.l" -+#line 357 "ldlex.l" - { RTOKEN(START); } - YY_BREAK - case 163: - YY_RULE_SETUP --#line 360 "ldlex.l" -+#line 358 "ldlex.l" - { RTOKEN(LIST); /* LIST and ignore to end of line */ } - YY_BREAK - case 164: - YY_RULE_SETUP --#line 361 "ldlex.l" -+#line 359 "ldlex.l" - { RTOKEN(SECT); } - YY_BREAK - case 165: - YY_RULE_SETUP --#line 362 "ldlex.l" -+#line 360 "ldlex.l" - { RTOKEN(ABSOLUTE); } - YY_BREAK - case 166: - YY_RULE_SETUP --#line 364 "ldlex.l" -+#line 362 "ldlex.l" - { - /* Filename without commas, needed to parse mri stuff */ - yylval.name = xstrdup (yytext); -@@ -2844,7 +2852,7 @@ - YY_BREAK - case 167: - YY_RULE_SETUP --#line 371 "ldlex.l" -+#line 369 "ldlex.l" - { - yylval.name = xstrdup (yytext); - return NAME; -@@ -2852,7 +2860,7 @@ - YY_BREAK - case 168: - YY_RULE_SETUP --#line 375 "ldlex.l" -+#line 373 "ldlex.l" - { - yylval.name = xstrdup (yytext + 2); - return LNAME; -@@ -2860,7 +2868,7 @@ - YY_BREAK - case 169: - YY_RULE_SETUP --#line 379 "ldlex.l" -+#line 377 "ldlex.l" - { - yylval.name = xstrdup (yytext); - return NAME; -@@ -2868,7 +2876,7 @@ - YY_BREAK - case 170: - YY_RULE_SETUP --#line 383 "ldlex.l" -+#line 381 "ldlex.l" - { - yylval.name = xstrdup (yytext + 2); - return LNAME; -@@ -2876,7 +2884,7 @@ - YY_BREAK - case 171: - YY_RULE_SETUP --#line 387 "ldlex.l" -+#line 385 "ldlex.l" - { - /* Annoyingly, this pattern can match comments, and we have - longest match issues to consider. So if the first two -@@ -2897,7 +2905,7 @@ - case 172: - /* rule 172 can match eol */ - YY_RULE_SETUP --#line 404 "ldlex.l" -+#line 402 "ldlex.l" - { - /* No matter the state, quotes - give what's inside */ -@@ -2909,54 +2917,54 @@ - case 173: - /* rule 173 can match eol */ - YY_RULE_SETUP --#line 411 "ldlex.l" -+#line 409 "ldlex.l" - { lineno++;} - YY_BREAK - case 174: - YY_RULE_SETUP --#line 412 "ldlex.l" -+#line 410 "ldlex.l" - { } - YY_BREAK - case 175: - YY_RULE_SETUP --#line 414 "ldlex.l" -+#line 412 "ldlex.l" - { return *yytext; } - YY_BREAK - case 176: - YY_RULE_SETUP --#line 416 "ldlex.l" -+#line 414 "ldlex.l" - { RTOKEN(GLOBAL); } - YY_BREAK - case 177: - YY_RULE_SETUP --#line 418 "ldlex.l" -+#line 416 "ldlex.l" - { RTOKEN(LOCAL); } - YY_BREAK - case 178: - YY_RULE_SETUP --#line 420 "ldlex.l" -+#line 418 "ldlex.l" - { RTOKEN(EXTERN); } - YY_BREAK - case 179: - YY_RULE_SETUP --#line 422 "ldlex.l" -+#line 420 "ldlex.l" - { yylval.name = xstrdup (yytext); - return VERS_IDENTIFIER; } - YY_BREAK - case 180: - YY_RULE_SETUP --#line 425 "ldlex.l" -+#line 423 "ldlex.l" - { yylval.name = xstrdup (yytext); - return VERS_TAG; } - YY_BREAK - case 181: - YY_RULE_SETUP --#line 428 "ldlex.l" -+#line 426 "ldlex.l" - { BEGIN(VERS_SCRIPT); return *yytext; } - YY_BREAK - case 182: - YY_RULE_SETUP --#line 430 "ldlex.l" -+#line 428 "ldlex.l" - { BEGIN(VERS_NODE); - vers_node_nesting = 0; - return *yytext; -@@ -2964,17 +2972,17 @@ - YY_BREAK - case 183: - YY_RULE_SETUP --#line 434 "ldlex.l" -+#line 432 "ldlex.l" - { return *yytext; } - YY_BREAK - case 184: - YY_RULE_SETUP --#line 435 "ldlex.l" -+#line 433 "ldlex.l" - { vers_node_nesting++; return *yytext; } - YY_BREAK - case 185: - YY_RULE_SETUP --#line 436 "ldlex.l" -+#line 434 "ldlex.l" - { if (--vers_node_nesting < 0) - BEGIN(VERS_SCRIPT); - return *yytext; -@@ -2983,17 +2991,17 @@ - case 186: - /* rule 186 can match eol */ - YY_RULE_SETUP --#line 441 "ldlex.l" -+#line 439 "ldlex.l" - { lineno++; } - YY_BREAK - case 187: - YY_RULE_SETUP --#line 443 "ldlex.l" -+#line 441 "ldlex.l" - { /* Eat up comments */ } - YY_BREAK - case 188: - YY_RULE_SETUP --#line 445 "ldlex.l" -+#line 443 "ldlex.l" - { /* Eat up whitespace */ } - YY_BREAK - case YY_STATE_EOF(INITIAL): -@@ -3005,7 +3013,7 @@ - case YY_STATE_EOF(VERS_START): - case YY_STATE_EOF(VERS_SCRIPT): - case YY_STATE_EOF(VERS_NODE): --#line 447 "ldlex.l" -+#line 445 "ldlex.l" - { - include_stack_ptr--; - -@@ -3026,20 +3034,20 @@ - YY_BREAK - case 189: - YY_RULE_SETUP --#line 465 "ldlex.l" -+#line 463 "ldlex.l" - lex_warn_invalid (" in script", yytext); - YY_BREAK - case 190: - YY_RULE_SETUP --#line 466 "ldlex.l" -+#line 464 "ldlex.l" - lex_warn_invalid (" in expression", yytext); - YY_BREAK - case 191: - YY_RULE_SETUP --#line 468 "ldlex.l" -+#line 466 "ldlex.l" - ECHO; - YY_BREAK --#line 3043 "ldlex.c" -+#line 3051 "ldlex.c" - - case YY_END_OF_BUFFER: - { -@@ -3223,7 +3231,7 @@ - - else - { -- yy_size_t num_to_read = -+ int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) -@@ -3237,7 +3245,7 @@ - - if ( b->yy_is_our_buffer ) - { -- yy_size_t new_size = b->yy_buf_size * 2; -+ int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; -@@ -3268,7 +3276,7 @@ - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), -- (yy_n_chars), num_to_read ); -+ (yy_n_chars), (size_t) num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } -@@ -3366,6 +3374,10 @@ - return yy_is_jam ? 0 : yy_current_state; - } - -+#ifndef YY_NO_UNPUT -+ -+#endif -+ - #ifndef YY_NO_INPUT - #ifdef __cplusplus - static int yyinput (void) -@@ -3390,7 +3402,7 @@ - - else - { /* need more input */ -- yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); -+ int offset = (yy_c_buf_p) - (yytext_ptr); - ++(yy_c_buf_p); - - switch ( yy_get_next_buffer( ) ) -@@ -3414,7 +3426,7 @@ - case EOB_ACT_END_OF_FILE: - { - if ( yywrap( ) ) -- return 0; -+ return EOF; - - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; -@@ -3666,7 +3678,7 @@ - */ - static void yyensure_buffer_stack (void) - { -- yy_size_t num_to_alloc; -+ int num_to_alloc; - - if (!(yy_buffer_stack)) { - -@@ -3763,11 +3775,12 @@ - * - * @return the newly allocated buffer state object. - */ --YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) -+YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) - { - YY_BUFFER_STATE b; - char *buf; -- yy_size_t n, i; -+ yy_size_t n; -+ int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; -@@ -3849,7 +3862,7 @@ - /** Get the length of the current token. - * - */ --yy_size_t yyget_leng (void) -+int yyget_leng (void) - { - return yyleng; - } -@@ -3864,29 +3877,29 @@ - } - - /** Set the current line number. -- * @param line_number -+ * @param _line_number - * - */ --void yyset_lineno (int line_number ) -+void yyset_lineno (int _line_number ) - { - -- yylineno = line_number; -+ yylineno = _line_number; - } - - /** Set the input stream. This does not discard the current - * input buffer. -- * @param in_str A readable stream. -+ * @param _in_str A readable stream. - * - * @see yy_switch_to_buffer - */ --void yyset_in (FILE * in_str ) -+void yyset_in (FILE * _in_str ) - { -- yyin = in_str ; -+ yyin = _in_str ; - } - --void yyset_out (FILE * out_str ) -+void yyset_out (FILE * _out_str ) - { -- yyout = out_str ; -+ yyout = _out_str ; - } - - int yyget_debug (void) -@@ -3894,9 +3907,9 @@ - return yy_flex_debug; - } - --void yyset_debug (int bdebug ) -+void yyset_debug (int _bdebug ) - { -- yy_flex_debug = bdebug ; -+ yy_flex_debug = _bdebug ; - } - - static int yy_init_globals (void) -@@ -3997,7 +4010,7 @@ - - #define YYTABLES_NAME "yytables" - --#line 468 "ldlex.l" -+#line 466 "ldlex.l" - - - -diff -rNU3 dist/ld/ldlex.l dist.nbsd/ld/ldlex.l ---- dist/ld/ldlex.l Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/ld/ldlex.l Wed Nov 7 11:13:50 2012 -@@ -60,10 +60,6 @@ - #undef YY_INPUT - #define YY_INPUT(buf,result,max_size) result = yy_input (buf, max_size) - --#ifndef YY_NO_UNPUT --#define YY_NO_UNPUT --#endif -- - #define MAX_INCLUDE_DEPTH 10 - static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH]; - static const char *file_name_stack[MAX_INCLUDE_DEPTH]; -@@ -92,6 +88,8 @@ - int yywrap (void) { return 1; } - #endif - %} -+ -+%option nounput - - %a 4000 - %o 5000 -diff -rNU3 dist/ld/ldmain.c dist.nbsd/ld/ldmain.c ---- dist/ld/ldmain.c Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/ld/ldmain.c Wed Nov 7 11:13:50 2012 -@@ -694,6 +694,23 @@ - einfo (_("%P%F: bfd_hash_lookup failed: %E\n")); - } - -+void -+add_ignoresym (const char *name) -+{ -+ if (link_info.ignore_hash == NULL) -+ { -+ link_info.ignore_hash = xmalloc (sizeof (struct bfd_hash_table)); -+ if (! bfd_hash_table_init_n (link_info.ignore_hash, -+ bfd_hash_newfunc, -+ sizeof (struct bfd_hash_entry), -+ 61)) -+ einfo (_("%P%F: bfd_hash_table_init failed: %E\n")); -+ } -+ -+ if (bfd_hash_lookup (link_info.ignore_hash, name, TRUE, TRUE) == NULL) -+ einfo (_("%P%F: bfd_hash_lookup failed: %E\n")); -+} -+ - /* Record a symbol to be wrapped, from the --wrap option. */ - - void -@@ -1291,24 +1308,25 @@ - - #define MAX_ERRORS_IN_A_ROW 5 - -+ if (info->ignore_hash != NULL -+ && bfd_hash_lookup (info->ignore_hash, name, FALSE, FALSE) != NULL) -+ return TRUE; -+ - if (config.warn_once) - { -- static struct bfd_hash_table *hash; -- - /* Only warn once about a particular undefined symbol. */ -- if (hash == NULL) -+ if (info->ignore_hash == NULL) - { -- hash = (struct bfd_hash_table *) -- xmalloc (sizeof (struct bfd_hash_table)); -- if (!bfd_hash_table_init (hash, bfd_hash_newfunc, -+ info->ignore_hash = xmalloc (sizeof (struct bfd_hash_table)); -+ if (!bfd_hash_table_init (info->ignore_hash, bfd_hash_newfunc, - sizeof (struct bfd_hash_entry))) - einfo (_("%F%P: bfd_hash_table_init failed: %E\n")); - } - -- if (bfd_hash_lookup (hash, name, FALSE, FALSE) != NULL) -+ if (bfd_hash_lookup (info->ignore_hash, name, FALSE, FALSE) != NULL) - return TRUE; - -- if (bfd_hash_lookup (hash, name, TRUE, TRUE) == NULL) -+ if (bfd_hash_lookup (info->ignore_hash, name, TRUE, TRUE) == NULL) - einfo (_("%F%P: bfd_hash_lookup failed: %E\n")); - } - -diff -rNU3 dist/ld/ldmain.h dist.nbsd/ld/ldmain.h ---- dist/ld/ldmain.h Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/ld/ldmain.h Wed Nov 7 11:13:51 2012 -@@ -44,6 +44,7 @@ - - extern void add_ysym (const char *); - extern void add_wrap (const char *); -+extern void add_ignoresym (const char *); - extern void add_keepsyms_file (const char *); - - #endif -diff -rNU3 dist/ld/lexsup.c dist.nbsd/ld/lexsup.c ---- dist/ld/lexsup.c Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/ld/lexsup.c Wed Nov 7 11:13:50 2012 -@@ -175,6 +175,7 @@ - OPTION_PLUGIN_OPT, - #endif /* ENABLE_PLUGINS */ - OPTION_DEFAULT_SCRIPT, -+ OPTION_IGNORE_UNRESOLVED_SYMBOL - }; - - /* The long options. This structure is used for both the option -@@ -512,7 +513,7 @@ - ONE_DASH }, - { {"shared", no_argument, NULL, OPTION_SHARED}, - '\0', NULL, N_("Create a shared library"), ONE_DASH }, -- { {"Bshareable", no_argument, NULL, OPTION_SHARED }, /* FreeBSD. */ -+ { {"Bshareable", no_argument, NULL, OPTION_SHARED }, /* FreeBSD, NetBSD. */ - '\0', NULL, NULL, ONE_DASH }, - { {"pie", no_argument, NULL, OPTION_PIE}, - '\0', NULL, N_("Create a position independent executable"), ONE_DASH }, -@@ -608,8 +609,14 @@ - { {"whole-archive", no_argument, NULL, OPTION_WHOLE_ARCHIVE}, - '\0', NULL, N_("Include all objects from following archives"), - TWO_DASHES }, -+ { {"Bforcearchive", no_argument, NULL, OPTION_WHOLE_ARCHIVE}, -+ '\0', NULL, NULL, TWO_DASHES }, /* NetBSD. */ - { {"wrap", required_argument, NULL, OPTION_WRAP}, - '\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES }, -+ { {"ignore-unresolved-symbol", required_argument, NULL, -+ OPTION_IGNORE_UNRESOLVED_SYMBOL}, -+ '\0', N_("SYMBOL"), -+ N_("Unresolved SYMBOL will not cause an error or warning"), TWO_DASHES }, - }; - - #define OPTION_COUNT ARRAY_SIZE (ld_options) -@@ -1452,6 +1459,9 @@ - break; - case OPTION_WRAP: - add_wrap (optarg); -+ break; -+ case OPTION_IGNORE_UNRESOLVED_SYMBOL: -+ add_ignoresym (optarg); - break; - case OPTION_DISCARD_NONE: - link_info.discard = discard_none; -diff -rNU3 dist/ld/scripttempl/elf.sc dist.nbsd/ld/scripttempl/elf.sc ---- dist/ld/scripttempl/elf.sc Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/ld/scripttempl/elf.sc Wed Nov 7 11:13:50 2012 -@@ -91,6 +91,8 @@ - # - # Each of these can also have corresponding .rel.* and .rela.* sections. - -+test -z "$TEXT_START_SYMBOLS" && TEXT_START_SYMBOLS="PROVIDE_HIDDEN (__eprol = .);" -+test -z "$ENTRY" && ENTRY=_start - test -z "$RODATA_NAME" && RODATA_NAME=rodata - test -z "$SDATA_NAME" && SDATA_NAME=sdata - test -z "$SBSS_NAME" && SBSS_NAME=sbss -diff -rNU3 dist/ld/scripttempl/sh.sc dist.nbsd/ld/scripttempl/sh.sc ---- dist/ld/scripttempl/sh.sc Wed Nov 7 11:43:28 2012 -+++ dist.nbsd/ld/scripttempl/sh.sc Wed Nov 7 11:13:50 2012 -@@ -6,17 +6,14 @@ - ___dtors = . ; - *(.dtors) - ___dtors_end = . ; -- } > ram" -+ }" - -+ - cat < ram} -+ } - ${CONSTRUCTING+${TORS}} -- .data : -+ .data ${RELOCATING+ ALIGN(${TARGET_PAGE_SIZE})} : - { - *(.data) - ${RELOCATING+*(.gcc_exc*)} -@@ -35,19 +32,19 @@ - ${RELOCATING+___EH_FRAME_END__ = . ;} - ${RELOCATING+LONG(0);} - ${RELOCATING+ _edata = . ; } -- } ${RELOCATING+ > ram} -- .bss : -+ } -+ .bss ${RELOCATING+ ALIGN(${TARGET_PAGE_SIZE})} : - { - ${RELOCATING+ _bss_start = . ; } - *(.bss) - *(COMMON) - ${RELOCATING+ _end = . ; } -- } ${RELOCATING+ > ram} -- .stack ${RELOCATING+ 0x30000 } : -+ } -+ .stack : - { - ${RELOCATING+ _stack = . ; } - *(.stack) -- } ${RELOCATING+ > ram} -+ } - .stab 0 ${RELOCATING+(NOLOAD)} : - { - *(.stab) -diff -rNU3 dist/libiberty/floatformat.c dist.nbsd/libiberty/floatformat.c ---- dist/libiberty/floatformat.c Wed Nov 7 11:43:26 2012 -+++ dist.nbsd/libiberty/floatformat.c Wed Nov 7 11:13:54 2012 -@@ -489,7 +489,11 @@ - if (nan) - dto = NAN; - else -+#ifdef __vax__ -+ dto = HUGE_VAL; -+#else - dto = INFINITY; -+#endif - - if (get_field (ufrom, fmt->byteorder, fmt->totalsize, fmt->sign_start, 1)) - dto = -dto; -diff -rNU3 dist/libiberty/strerror.c dist.nbsd/libiberty/strerror.c ---- dist/libiberty/strerror.c Wed Nov 7 11:43:26 2012 -+++ dist.nbsd/libiberty/strerror.c Wed Nov 7 11:13:54 2012 -@@ -347,7 +347,7 @@ - ENTRY(EPROTOTYPE, "EPROTOTYPE", "Protocol wrong type for socket"), - #endif - #if defined (ENOPROTOOPT) -- ENTRY(ENOPROTOOPT, "ENOPROTOOPT", "Protocol not available"), -+ ENTRY(ENOPROTOOPT, "ENOPROTOOPT", "Protocol option not available"), - #endif - #if defined (EPROTONOSUPPORT) - ENTRY(EPROTONOSUPPORT, "EPROTONOSUPPORT", "Protocol not supported"), -diff -rNU3 dist/opcodes/cgen.sh dist.nbsd/opcodes/cgen.sh ---- dist/opcodes/cgen.sh Wed Nov 7 11:43:26 2012 -+++ dist.nbsd/opcodes/cgen.sh Wed Nov 7 11:13:50 2012 -@@ -61,6 +61,7 @@ - shift ; extrafiles=$9 - - rootdir=${srcdir}/.. -+move_if_change="${CONFIG_SHELL:-/bin/sh} ${rootdir}/move-if-change" - - # $arch is $6, as passed on the command line. - # $ARCH is the same argument but in all uppercase. -diff -rNU3 dist/opcodes/configure dist.nbsd/opcodes/configure ---- dist/opcodes/configure Wed Nov 7 11:43:26 2012 -+++ dist.nbsd/opcodes/configure Wed Nov 7 11:13:50 2012 -@@ -12473,6 +12473,14 @@ - # specified, as in sh3-elf, sh3b-linux-gnu, etc. - # Include it just for ELF targets, since the SH5 bfd:s are ELF only. - for t in $target $canon_targets; do -+ # For NetBSD we do NOT want SH5 support unless sh5 or sh64 -+ # is specified -+ case $t in -+ sh5*-* | sh64*-*) # let the case below handle it -+ ;; -+ sh*-*-netbsd* | sh*l*-*-netbsd*) -+ continue ;; -+ esac - case $t in - all | sh5*-* | sh64*-* | sh-*-*elf* | shl*-*-*elf* | \ - sh-*-linux* | shl-*-linux*) -diff -rNU3 dist/opcodes/configure.in dist.nbsd/opcodes/configure.in ---- dist/opcodes/configure.in Wed Nov 7 11:43:26 2012 -+++ dist.nbsd/opcodes/configure.in Wed Nov 7 11:13:50 2012 -@@ -279,6 +279,14 @@ - # specified, as in sh3-elf, sh3b-linux-gnu, etc. - # Include it just for ELF targets, since the SH5 bfd:s are ELF only. - for t in $target $canon_targets; do -+ # For NetBSD we do NOT want SH5 support unless sh5 or sh64 -+ # is specified -+ case $t in -+ sh5*-* | sh64*-*) # let the case below handle it -+ ;; -+ sh*-*-netbsd* | sh*l*-*-netbsd*) -+ continue ;; -+ esac - case $t in - all | sh5*-* | sh64*-* | sh-*-*elf* | shl*-*-*elf* | \ - sh-*-linux* | shl-*-linux*) -diff -rNU3 dist/opcodes/mips-opc.c dist.nbsd/opcodes/mips-opc.c ---- dist/opcodes/mips-opc.c Wed Nov 7 11:43:26 2012 -+++ dist.nbsd/opcodes/mips-opc.c Wed Nov 7 11:13:50 2012 -@@ -709,10 +709,12 @@ - {"floor.w.s", "D,S", 0x4600000f, 0xffff003f, WR_D|RD_S|FP_S, 0, I2 }, - {"hibernate","", 0x42000023, 0xffffffff, 0, 0, V1 }, - {"ins", "t,r,+A,+B", 0x7c000004, 0xfc00003f, WR_t|RD_s, 0, I33 }, -+{"jr", "s", 0, (int) M_JR_S, INSN_MACRO, 0, I1 }, - {"jr", "s", 0x00000008, 0xfc1fffff, UBD|RD_s, 0, I1 }, - /* jr.hb is officially MIPS{32,64}R2, but it works on R1 as jr with - the same hazard barrier effect. */ - {"jr.hb", "s", 0x00000408, 0xfc1fffff, UBD|RD_s, 0, I32 }, -+{"j", "s", 0, (int) M_J_S, INSN_MACRO, 0, I1 }, - {"j", "s", 0x00000008, 0xfc1fffff, UBD|RD_s, 0, I1 }, /* jr */ - /* SVR4 PIC code requires special handling for j, so it must be a - macro. */ -@@ -721,7 +723,9 @@ - assembler, but will never match user input (because the line above - will match first). */ - {"j", "a", 0x08000000, 0xfc000000, UBD, 0, I1 }, -+{"jalr", "s", 0, (int) M_JALR_S, INSN_MACRO, 0, I1 }, - {"jalr", "s", 0x0000f809, 0xfc1fffff, UBD|RD_s|WR_d, 0, I1 }, -+{"jalr", "d,s", 0, (int) M_JALR_DS, INSN_MACRO, 0, I1 }, - {"jalr", "d,s", 0x00000009, 0xfc1f07ff, UBD|RD_s|WR_d, 0, I1 }, - /* jalr.hb is officially MIPS{32,64}R2, but it works on R1 as jalr - with the same hazard barrier effect. */ +diff -rNU3 dist.orig/configure dist.nbsd/configure +--- dist.orig/configure 2011-08-14 14:28:15.000000000 +0200 ++++ dist.nbsd/configure 2013-04-09 08:46:02.000000000 +0200 +@@ -14663,6 +14663,8 @@ + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ++ : Avoid regenerating within pkgsrc ++ exit 0 + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; +diff -rNU3 dist.orig/etc/configure dist.nbsd/etc/configure +--- dist.orig/etc/configure 2009-08-22 18:56:38.000000000 +0200 ++++ dist.nbsd/etc/configure 2013-04-08 23:29:45.000000000 +0200 +@@ -2409,6 +2409,8 @@ + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ++ : Avoid regenerating within pkgsrc ++ exit 0 + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; +diff -rNU3 dist.orig/gas/configure dist.nbsd/gas/configure +--- dist.orig/gas/configure 2011-05-18 11:41:14.000000000 +0200 ++++ dist.nbsd/gas/configure 2013-04-08 23:50:57.000000000 +0200 +@@ -14827,6 +14827,8 @@ + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ++ : Avoid regenerating within pkgsrc ++ exit 0 + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; +diff -rNU3 dist.orig/gas/configure.tgt dist.nbsd/gas/configure.tgt +--- dist.orig/gas/configure.tgt 2011-06-20 15:23:21.000000000 +0200 ++++ dist.nbsd/gas/configure.tgt 2013-04-08 23:50:58.000000000 +0200 +@@ -201,7 +201,8 @@ + i386-*-freebsd[12].*) fmt=aout em=386bsd ;; + i386-*-freebsd[12]) fmt=aout em=386bsd ;; + i386-*-freebsd* \ +- | i386-*-kfreebsd*-gnu) fmt=elf em=freebsd ;; ++ | i386-*-kfreebsd*-gnu \ ++ | i386-*-dragonfly*) fmt=elf em=freebsd ;; + i386-*-sysv*) fmt=coff ;; + i386-*-sco3.2v5*coff) fmt=coff ;; + i386-*-isc*) fmt=coff ;; +@@ -417,6 +418,7 @@ + *-*-aout | *-*-scout) fmt=aout ;; + *-*-dragonfly*) fmt=elf em=dragonfly ;; + *-*-freebsd* | *-*-kfreebsd*-gnu) fmt=elf em=freebsd ;; ++ *-*-dragonfly*) fmt=elf em=freebsd ;; + *-*-bsd*) fmt=aout em=sun3 ;; + *-*-generic) fmt=generic ;; + *-*-xray | *-*-hms) fmt=coff ;; +diff -rNU3 dist.orig/gold/configure dist.nbsd/gold/configure +--- dist.orig/gold/configure 2011-09-14 03:29:01.000000000 +0200 ++++ dist.nbsd/gold/configure 2013-04-08 23:32:19.000000000 +0200 +@@ -7999,6 +7999,8 @@ + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ++ : Avoid regenerating within pkgsrc ++ exit 0 + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; +diff -rNU3 dist.orig/gprof/configure dist.nbsd/gprof/configure +--- dist.orig/gprof/configure 2011-03-30 17:23:20.000000000 +0200 ++++ dist.nbsd/gprof/configure 2013-04-08 23:32:50.000000000 +0200 +@@ -12700,6 +12700,8 @@ + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ++ : Avoid regenerating within pkgsrc ++ exit 0 + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; +diff -rNU3 dist.orig/intl/configure dist.nbsd/intl/configure +--- dist.orig/intl/configure 2010-09-27 22:22:53.000000000 +0200 ++++ dist.nbsd/intl/configure 2013-04-08 23:33:07.000000000 +0200 +@@ -7182,6 +7182,8 @@ + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ++ : Avoid regenerating within pkgsrc ++ exit 0 + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; +diff -rNU3 dist.orig/ld/configure dist.nbsd/ld/configure +--- dist.orig/ld/configure 2011-03-28 12:27:07.000000000 +0200 ++++ dist.nbsd/ld/configure 2013-04-08 23:34:44.000000000 +0200 +@@ -17534,6 +17534,8 @@ + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ++ : Avoid regenerating within pkgsrc ++ exit 0 + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; +diff -rNU3 dist.orig/libiberty/configure dist.nbsd/libiberty/configure +--- dist.orig/libiberty/configure 2011-08-22 19:16:25.000000000 +0200 ++++ dist.nbsd/libiberty/configure 2013-04-08 23:36:09.000000000 +0200 +@@ -7538,6 +7538,8 @@ + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ++ : Avoid regenerating within pkgsrc ++ exit 0 + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; +diff -rNU3 dist.orig/opcodes/configure dist.nbsd/opcodes/configure +--- dist.orig/opcodes/configure 2011-07-24 16:20:13.000000000 +0200 ++++ dist.nbsd/opcodes/configure 2013-04-08 23:36:31.000000000 +0200 +@@ -13171,6 +13171,8 @@ + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ++ : Avoid regenerating within pkgsrc ++ exit 0 + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; diff --git a/external/gpl3/binutils/patches/0001-minix.patch b/external/gpl3/binutils/patches/0001-minix.patch index 8f69b79d6..f983ad283 100644 --- a/external/gpl3/binutils/patches/0001-minix.patch +++ b/external/gpl3/binutils/patches/0001-minix.patch @@ -1,6 +1,6 @@ -diff -r -x CVS -N -U 3 dist.orig/bfd/config.bfd dist/bfd/config.bfd ---- dist.orig/bfd/config.bfd 2012-10-31 17:08:07.757323090 +0100 -+++ dist/bfd/config.bfd 2012-10-31 17:47:37.039900295 +0100 +diff -rNU3 dist.nbsd/bfd/config.bfd dist/bfd/config.bfd +--- dist.nbsd/bfd/config.bfd 2013-04-08 23:50:35.000000000 +0200 ++++ dist/bfd/config.bfd 2013-04-09 00:31:05.000000000 +0200 @@ -281,7 +281,7 @@ ;; arm-*-elf | arm-*-freebsd* | arm*-*-linux-* | arm*-*-conix* | \ @@ -10,7 +10,7 @@ diff -r -x CVS -N -U 3 dist.orig/bfd/config.bfd dist/bfd/config.bfd targ_defvec=bfd_elf32_littlearm_vec targ_selvecs=bfd_elf32_bigarm_vec ;; -@@ -697,6 +697,9 @@ +@@ -663,6 +663,9 @@ i[3-7]86-none-*) targ_defvec=i386coff_vec ;; @@ -20,32 +20,32 @@ diff -r -x CVS -N -U 3 dist.orig/bfd/config.bfd dist/bfd/config.bfd i[3-7]86-*-aout* | i[3-7]86*-*-vsta*) targ_defvec=i386aout_vec ;; -diff -r -x CVS -N -U 3 dist.orig/bfd/configure dist/bfd/configure ---- dist.orig/bfd/configure 2012-10-31 17:08:07.763989894 +0100 -+++ dist/bfd/configure 2012-10-31 18:01:20.947045411 +0100 -@@ -15219,6 +15219,7 @@ +diff -rNU3 dist.nbsd/bfd/configure dist/bfd/configure +--- dist.nbsd/bfd/configure 2013-04-08 23:52:18.000000000 +0200 ++++ dist/bfd/configure 2013-04-09 00:31:05.000000000 +0200 +@@ -15210,6 +15210,7 @@ bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; bfd_elf32_i386_sol2_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; + bfd_elf32_i386_minix_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; + bfd_elf32_i386_dragonfly_vec) tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;; + bfd_elf32_i386_nacl_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; bfd_elf32_i386_vxworks_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; - bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; - bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; -diff -r -x CVS -N -U 3 dist.orig/bfd/configure.in dist/bfd/configure.in ---- dist.orig/bfd/configure.in 2012-10-31 17:08:07.743989476 +0100 -+++ dist/bfd/configure.in 2012-10-31 17:47:37.039900295 +0100 -@@ -710,6 +710,7 @@ +diff -rNU3 dist.nbsd/bfd/configure.in dist/bfd/configure.in +--- dist.nbsd/bfd/configure.in 2013-04-08 23:50:41.000000000 +0200 ++++ dist/bfd/configure.in 2013-04-09 00:31:05.000000000 +0200 +@@ -709,6 +709,7 @@ bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; bfd_elf32_i386_sol2_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; + bfd_elf32_i386_minix_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; + bfd_elf32_i386_nacl_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; bfd_elf32_i386_vxworks_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; - bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; -diff -r -x CVS -N -U 3 dist.orig/bfd/elf32-i386.c dist/bfd/elf32-i386.c ---- dist.orig/bfd/elf32-i386.c 2012-10-31 17:08:07.743989476 +0100 -+++ dist/bfd/elf32-i386.c 2012-10-31 17:47:37.039900295 +0100 -@@ -4761,6 +4761,18 @@ +diff -rNU3 dist.nbsd/bfd/elf32-i386.c dist/bfd/elf32-i386.c +--- dist.nbsd/bfd/elf32-i386.c 2013-04-09 00:27:33.000000000 +0200 ++++ dist/bfd/elf32-i386.c 2013-04-09 00:31:05.000000000 +0200 +@@ -4962,6 +4962,18 @@ #include "elf32-target.h" @@ -64,21 +64,21 @@ diff -r -x CVS -N -U 3 dist.orig/bfd/elf32-i386.c dist/bfd/elf32-i386.c /* FreeBSD support. */ #undef TARGET_LITTLE_SYM -diff -r -x CVS -N -U 3 dist.orig/bfd/targets.c dist/bfd/targets.c ---- dist.orig/bfd/targets.c 2012-10-31 17:08:07.767323296 +0100 -+++ dist/bfd/targets.c 2012-10-31 17:47:37.039900295 +0100 -@@ -605,6 +605,7 @@ +diff -rNU3 dist.nbsd/bfd/targets.c dist/bfd/targets.c +--- dist.nbsd/bfd/targets.c 2013-04-08 23:50:47.000000000 +0200 ++++ dist/bfd/targets.c 2013-04-09 00:31:05.000000000 +0200 +@@ -617,6 +617,7 @@ extern const bfd_target bfd_elf32_hppa_vec; extern const bfd_target bfd_elf32_i370_vec; extern const bfd_target bfd_elf32_i386_freebsd_vec; +extern const bfd_target bfd_elf32_i386_minix_vec; + extern const bfd_target bfd_elf32_i386_nacl_vec; extern const bfd_target bfd_elf32_i386_sol2_vec; extern const bfd_target bfd_elf32_i386_vxworks_vec; - extern const bfd_target bfd_elf32_i386_vec; -diff -r -x CVS -N -U 3 dist.orig/config.guess dist/config.guess ---- dist.orig/config.guess 2012-10-31 17:08:07.770656699 +0100 -+++ dist/config.guess 2012-10-31 17:47:37.039900295 +0100 -@@ -855,8 +855,8 @@ +diff -rNU3 dist.nbsd/config.guess dist/config.guess +--- dist.nbsd/config.guess 2013-04-08 23:50:48.000000000 +0200 ++++ dist/config.guess 2013-04-09 00:31:05.000000000 +0200 +@@ -858,8 +858,8 @@ # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; @@ -89,9 +89,9 @@ diff -r -x CVS -N -U 3 dist.orig/config.guess dist/config.guess exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -diff -r -x CVS -N -U 3 dist.orig/gas/config/tc-i386.h dist/gas/config/tc-i386.h ---- dist.orig/gas/config/tc-i386.h 2012-10-31 17:08:07.493984261 +0100 -+++ dist/gas/config/tc-i386.h 2012-10-31 17:47:37.086567936 +0100 +diff -rNU3 dist.nbsd/gas/config/tc-i386.h dist/gas/config/tc-i386.h +--- dist.nbsd/gas/config/tc-i386.h 2013-04-08 23:50:49.000000000 +0200 ++++ dist/gas/config/tc-i386.h 2013-04-09 00:31:05.000000000 +0200 @@ -68,6 +68,10 @@ #define ELF_TARGET_FORMAT64 "elf64-x86-64-sol2" #endif @@ -103,9 +103,9 @@ diff -r -x CVS -N -U 3 dist.orig/gas/config/tc-i386.h dist/gas/config/tc-i386.h #ifndef ELF_TARGET_FORMAT #define ELF_TARGET_FORMAT "elf32-i386" #endif -diff -r -x CVS -N -U 3 dist.orig/gas/config/te-minix.h dist/gas/config/te-minix.h ---- dist.orig/gas/config/te-minix.h 1970-01-01 01:00:00.000000000 +0100 -+++ dist/gas/config/te-minix.h 2012-10-31 17:47:37.086567936 +0100 +diff -rNU3 dist.nbsd/gas/config/te-minix.h dist/gas/config/te-minix.h +--- dist.nbsd/gas/config/te-minix.h 1970-01-01 01:00:00.000000000 +0100 ++++ dist/gas/config/te-minix.h 2013-04-09 00:31:05.000000000 +0200 @@ -0,0 +1,9 @@ +#define TE_MINIX 1 + @@ -116,9 +116,9 @@ diff -r -x CVS -N -U 3 dist.orig/gas/config/te-minix.h dist/gas/config/te-minix. +#define LOCAL_LABELS_FB 1 + +#include "obj-format.h" -diff -r -x CVS -N -U 3 dist.orig/gas/configure dist/gas/configure ---- dist.orig/gas/configure 2012-10-31 17:08:07.507317870 +0100 -+++ dist/gas/configure 2012-10-31 17:47:37.089901339 +0100 +diff -rNU3 dist.nbsd/gas/configure dist/gas/configure +--- dist.nbsd/gas/configure 2013-04-08 23:50:57.000000000 +0200 ++++ dist/gas/configure 2013-04-09 00:31:05.000000000 +0200 @@ -6127,6 +6127,10 @@ fi ;; @@ -130,10 +130,10 @@ diff -r -x CVS -N -U 3 dist.orig/gas/configure dist/gas/configure gnu*) lt_cv_deplibs_check_method=pass_all ;; -diff -r -x CVS -N -U 3 dist.orig/gas/configure.tgt dist/gas/configure.tgt ---- dist.orig/gas/configure.tgt 2012-10-31 17:08:07.507317870 +0100 -+++ dist/gas/configure.tgt 2012-10-31 17:47:37.683247033 +0100 -@@ -428,6 +428,7 @@ +diff -rNU3 dist.nbsd/gas/configure.tgt dist/gas/configure.tgt +--- dist.nbsd/gas/configure.tgt 2013-04-08 23:50:58.000000000 +0200 ++++ dist/gas/configure.tgt 2013-04-09 00:31:05.000000000 +0200 +@@ -426,6 +426,7 @@ *-*-elf | *-*-sysv4*) fmt=elf ;; *-*-solaris*) fmt=elf em=solaris ;; *-*-aros*) fmt=elf em=linux ;; @@ -141,58 +141,18 @@ diff -r -x CVS -N -U 3 dist.orig/gas/configure.tgt dist/gas/configure.tgt *-*-vxworks* | *-*-windiss) fmt=elf em=vxworks ;; *-*-netware) fmt=elf em=netware ;; esac -diff -r -x CVS -N -U 3 dist.orig/ld/configure.tgt dist/ld/configure.tgt ---- dist.orig/ld/configure.tgt 2012-10-31 17:08:07.663987808 +0100 -+++ dist/ld/configure.tgt 2012-10-31 17:47:37.869917589 +0100 -@@ -73,6 +73,8 @@ - armeb-*-elf) targ_emul=armelfb ;; - arm-*-elf | arm*-*-eabi*) - targ_emul=armelf ;; -+arm*-*-minix*) targ_emul=armelf_minix -+ targ_extra_emuls="armelf" ;; - arm*-*-symbianelf*) targ_emul=armsymbian;; - arm-*-kaos*) targ_emul=armelf ;; - arm9e-*-elf) targ_emul=armelf ;; -@@ -198,6 +200,8 @@ - i[3-7]86-*-bsd386) targ_emul=i386bsd ;; - i[3-7]86-*-bsdi*) targ_emul=i386bsd ;; - i[3-7]86-*-aout) targ_emul=i386aout ;; -+i[3-7]86-*-minix) targ_emul=elf_i386_minix -+ targ_extra_emuls="elf_i386" ;; - i[3-7]86-*-linux*aout*) targ_emul=i386linux - targ_extra_emuls=elf_i386 - tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'` ;; -diff -r -x CVS -N -U 3 dist.orig/ld/emulparams/armelf_minix.sh dist/ld/emulparams/armelf_minix.sh ---- dist.orig/ld/emulparams/armelf_minix.sh 1970-01-01 01:00:00.000000000 +0100 -+++ dist/ld/emulparams/armelf_minix.sh 2012-10-31 17:47:37.869917589 +0100 -@@ -0,0 +1,3 @@ -+. ${srcdir}/emulparams/armelf.sh -+. ${srcdir}/emulparams/elf_minix.sh -+OUTPUT_FORMAT="elf32-littlearm" -diff -r -x CVS -N -U 3 dist.orig/ld/emulparams/elf_i386_minix.sh dist/ld/emulparams/elf_i386_minix.sh ---- dist.orig/ld/emulparams/elf_i386_minix.sh 1970-01-01 01:00:00.000000000 +0100 -+++ dist/ld/emulparams/elf_i386_minix.sh 2012-10-31 17:47:37.869917589 +0100 -@@ -0,0 +1,3 @@ -+. ${srcdir}/emulparams/elf_i386.sh -+. ${srcdir}/emulparams/elf_minix.sh -+OUTPUT_FORMAT="elf32-i386-minix" -diff -r -x CVS -N -U 3 dist.orig/ld/emulparams/elf_minix.sh dist/ld/emulparams/elf_minix.sh ---- dist.orig/ld/emulparams/elf_minix.sh 1970-01-01 01:00:00.000000000 +0100 -+++ dist/ld/emulparams/elf_minix.sh 2012-10-31 17:47:37.869917589 +0100 -@@ -0,0 +1 @@ -+ELF_INTERPRETER_NAME=\"/libexec/ld-elf.so.1\" -diff -r -x CVS -N -U 3 dist.orig/ld/Makefile.in dist/ld/Makefile.in ---- dist.orig/ld/Makefile.in 2012-10-31 17:08:07.663987808 +0100 -+++ dist/ld/Makefile.in 2012-10-31 17:47:37.869917589 +0100 -@@ -448,6 +448,7 @@ +diff -rNU3 dist.nbsd/ld/Makefile.in dist/ld/Makefile.in +--- dist.nbsd/ld/Makefile.in 2013-04-08 23:50:59.000000000 +0200 ++++ dist/ld/Makefile.in 2013-04-09 00:31:05.000000000 +0200 +@@ -449,6 +449,7 @@ earmelf_fbsd.c \ earmelf_linux.c \ earmelf_linux_eabi.c \ + earmelf_minix.c \ earmelf_nbsd.c \ - earmelf_nbsd_eabi.c \ earmelf_vxworks.c \ -@@ -549,6 +550,7 @@ + earmelfb.c \ +@@ -566,6 +567,7 @@ eelf_i386_chaos.c \ eelf_i386_fbsd.c \ eelf_i386_ldso.c \ @@ -200,7 +160,7 @@ diff -r -x CVS -N -U 3 dist.orig/ld/Makefile.in dist/ld/Makefile.in eelf_i386_sol2.c \ eelf_i386_vxworks.c \ eelf_s390.c \ -@@ -2120,6 +2122,10 @@ +@@ -2156,6 +2158,10 @@ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} armelf_linux_eabi "$(tdir_armelf_linux_abi)" @@ -211,7 +171,7 @@ diff -r -x CVS -N -U 3 dist.orig/ld/Makefile.in dist/ld/Makefile.in earmelf_nbsd.c: $(srcdir)/emulparams/armelf_nbsd.sh \ $(srcdir)/emulparams/armelf.sh \ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ -@@ -2538,6 +2544,10 @@ +@@ -2640,6 +2646,10 @@ eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)" @@ -222,3 +182,55 @@ diff -r -x CVS -N -U 3 dist.orig/ld/Makefile.in dist/ld/Makefile.in eelf_i386_sol2.c: $(srcdir)/emulparams/elf_i386_sol2.sh \ $(srcdir)/emulparams/solaris2.sh \ $(srcdir)/emultempl/solaris2.em \ +diff -rNU3 dist.nbsd/ld/configure.tgt dist/ld/configure.tgt +--- dist.nbsd/ld/configure.tgt 2013-04-08 23:51:00.000000000 +0200 ++++ dist/ld/configure.tgt 2013-04-09 00:31:05.000000000 +0200 +@@ -68,6 +68,8 @@ + armeb-*-elf) targ_emul=armelfb ;; + arm-*-elf | arm*-*-eabi*) + targ_emul=armelf ;; ++arm*-*-minix*) targ_emul=armelf_minix ++ targ_extra_emuls="armelf" ;; + arm*-*-symbianelf*) targ_emul=armsymbian;; + arm-*-kaos*) targ_emul=armelf ;; + arm9e-*-elf) targ_emul=armelf ;; +@@ -180,6 +182,8 @@ + i[3-7]86-*-bsd386) targ_emul=i386bsd ;; + i[3-7]86-*-bsdi*) targ_emul=i386bsd ;; + i[3-7]86-*-aout) targ_emul=i386aout ;; ++i[3-7]86-*-minix) targ_emul=elf_i386_minix ++ targ_extra_emuls="elf_i386" ;; + i[3-7]86-*-linux*aout*) targ_emul=i386linux + targ_extra_emuls=elf_i386 + tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'` ;; +diff -rNU3 dist.nbsd/ld/emulparams/armelf_minix.sh dist/ld/emulparams/armelf_minix.sh +--- dist.nbsd/ld/emulparams/armelf_minix.sh 1970-01-01 01:00:00.000000000 +0100 ++++ dist/ld/emulparams/armelf_minix.sh 2013-04-09 00:31:05.000000000 +0200 +@@ -0,0 +1,15 @@ ++. ${srcdir}/emulparams/armelf.sh ++. ${srcdir}/emulparams/elf_minix.sh ++OUTPUT_FORMAT="elf32-littlearm" ++MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" ++COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" ++ ++DATA_START_SYMBOLS='PROVIDE (__data_start = .);'; ++ ++# Dynamic libraries support ++GENERATE_SHLIB_SCRIPT=yes ++TARGET2_TYPE=got-rel ++ ++GENERATE_PIE_SCRIPT=yes ++ ++unset EMBEDDED +diff -rNU3 dist.nbsd/ld/emulparams/elf_i386_minix.sh dist/ld/emulparams/elf_i386_minix.sh +--- dist.nbsd/ld/emulparams/elf_i386_minix.sh 1970-01-01 01:00:00.000000000 +0100 ++++ dist/ld/emulparams/elf_i386_minix.sh 2013-04-09 00:31:05.000000000 +0200 +@@ -0,0 +1,3 @@ ++. ${srcdir}/emulparams/elf_i386.sh ++. ${srcdir}/emulparams/elf_minix.sh ++OUTPUT_FORMAT="elf32-i386-minix" +diff -rNU3 dist.nbsd/ld/emulparams/elf_minix.sh dist/ld/emulparams/elf_minix.sh +--- dist.nbsd/ld/emulparams/elf_minix.sh 1970-01-01 01:00:00.000000000 +0100 ++++ dist/ld/emulparams/elf_minix.sh 2013-04-09 00:31:05.000000000 +0200 +@@ -0,0 +1 @@ ++ELF_INTERPRETER_NAME=\"/libexec/ld-elf.so.1\" diff --git a/tools/binutils/Makefile b/tools/binutils/Makefile index b24d9f6c4..ce70f8be8 100644 --- a/tools/binutils/Makefile +++ b/tools/binutils/Makefile @@ -25,6 +25,16 @@ ALL_TARGET+= all-gprof INSTALL_TARGET+=install-gprof .endif +.if defined(__MINIX) +CONFIGURE_ARGS+= \ + --with-ld=default \ + --with-lto +#LSC: FIXME Not yet gold, need to create +# external/gpl3/binutils/usr.bin/gold directory & needed Makefiles +# --with-gold=yes +#ALL_TARGET+= all-gold +#INSTALL_TARGET+= install-gold +.endif # defined(__MINIX) .include "${.CURDIR}/../Makefile.gnuhost" CCADDFLAGS= -I${DESTDIR}/usr/include -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/