From bf4b366f48251c542c8aea15ec885f9fc6a01d5c Mon Sep 17 00:00:00 2001 From: Rahul Chaudhry Date: Mon, 18 Sep 2017 10:30:32 -0700 Subject: Update prebuilt GCC to build 4342532. This build contains binutils-2_27: - https://android-review.googlesource.com/c/toolchain/binutils/+/474197 It also contains many other (smaller) changes since the last time prebuilts were updated on 2017-07-11 (build 4168537). Bug: 37683243 Test: 'lunch aosp_arm-eng; m' completed successfully on linux host. Change-Id: Ic000ee0039bf7de561844525dfcadc086e99ca98 --- arm-linux-androideabi/bin/readelf | 1 + arm-linux-androideabi/lib/armv7-a/hard/libatomic.a | Bin 187882 -> 188090 bytes arm-linux-androideabi/lib/armv7-a/hard/libgomp.a | Bin 505544 -> 504836 bytes arm-linux-androideabi/lib/armv7-a/libatomic.a | Bin 187558 -> 187746 bytes arm-linux-androideabi/lib/armv7-a/libgomp.a | Bin 505444 -> 504668 bytes .../lib/armv7-a/thumb/hard/libatomic.a | Bin 186738 -> 186946 bytes .../lib/armv7-a/thumb/hard/libgomp.a | Bin 500776 -> 500048 bytes .../lib/armv7-a/thumb/libatomic.a | Bin 186310 -> 186498 bytes arm-linux-androideabi/lib/armv7-a/thumb/libgomp.a | Bin 500596 -> 499800 bytes .../lib/ldscripts/armelf_linux_eabi.x | 64 ++++++++++----------- .../lib/ldscripts/armelf_linux_eabi.xbn | 61 ++++++++++---------- .../lib/ldscripts/armelf_linux_eabi.xc | 63 ++++++++++---------- .../lib/ldscripts/armelf_linux_eabi.xd | 63 ++++++++++---------- .../lib/ldscripts/armelf_linux_eabi.xdc | 63 ++++++++++---------- .../lib/ldscripts/armelf_linux_eabi.xdw | 63 ++++++++++---------- .../lib/ldscripts/armelf_linux_eabi.xn | 63 ++++++++++---------- .../lib/ldscripts/armelf_linux_eabi.xr | 23 ++++---- .../lib/ldscripts/armelf_linux_eabi.xs | 51 ++++++++-------- .../lib/ldscripts/armelf_linux_eabi.xsc | 52 ++++++++--------- .../lib/ldscripts/armelf_linux_eabi.xsw | 51 ++++++++-------- .../lib/ldscripts/armelf_linux_eabi.xu | 23 ++++---- .../lib/ldscripts/armelf_linux_eabi.xw | 63 ++++++++++---------- .../lib/ldscripts/armelfb_linux_eabi.x | 64 ++++++++++----------- .../lib/ldscripts/armelfb_linux_eabi.xbn | 61 ++++++++++---------- .../lib/ldscripts/armelfb_linux_eabi.xc | 63 ++++++++++---------- .../lib/ldscripts/armelfb_linux_eabi.xd | 63 ++++++++++---------- .../lib/ldscripts/armelfb_linux_eabi.xdc | 63 ++++++++++---------- .../lib/ldscripts/armelfb_linux_eabi.xdw | 63 ++++++++++---------- .../lib/ldscripts/armelfb_linux_eabi.xn | 63 ++++++++++---------- .../lib/ldscripts/armelfb_linux_eabi.xr | 23 ++++---- .../lib/ldscripts/armelfb_linux_eabi.xs | 51 ++++++++-------- .../lib/ldscripts/armelfb_linux_eabi.xsc | 52 ++++++++--------- .../lib/ldscripts/armelfb_linux_eabi.xsw | 51 ++++++++-------- .../lib/ldscripts/armelfb_linux_eabi.xu | 23 ++++---- .../lib/ldscripts/armelfb_linux_eabi.xw | 63 ++++++++++---------- arm-linux-androideabi/lib/libatomic.a | Bin 255186 -> 255266 bytes arm-linux-androideabi/lib/libgomp.a | Bin 507632 -> 506840 bytes arm-linux-androideabi/lib/thumb/libatomic.a | Bin 258850 -> 258926 bytes arm-linux-androideabi/lib/thumb/libgomp.a | Bin 498612 -> 497832 bytes bin/arm-linux-androideabi-addr2line | Bin 734552 -> 818008 bytes bin/arm-linux-androideabi-ar | Bin 763136 -> 846144 bytes bin/arm-linux-androideabi-as | Bin 1328192 -> 1437160 bytes bin/arm-linux-androideabi-c++filt | Bin 732376 -> 816440 bytes bin/arm-linux-androideabi-cpp | Bin 789000 -> 789000 bytes bin/arm-linux-androideabi-dwp | Bin 2795464 -> 2872264 bytes bin/arm-linux-androideabi-elfedit | Bin 27976 -> 28584 bytes bin/arm-linux-androideabi-gcc-4.9.x | Bin 784904 -> 784904 bytes bin/arm-linux-androideabi-gcc-ar | Bin 25440 -> 25440 bytes bin/arm-linux-androideabi-gcc-nm | Bin 25408 -> 25408 bytes bin/arm-linux-androideabi-gcc-ranlib | Bin 25408 -> 25408 bytes bin/arm-linux-androideabi-gprof | Bin 801368 -> 882968 bytes bin/arm-linux-androideabi-ld.bfd | Bin 1223392 -> 1318856 bytes bin/arm-linux-androideabi-ld.gold | Bin 4692104 -> 4999288 bytes bin/arm-linux-androideabi-nm | Bin 745528 -> 829784 bytes bin/arm-linux-androideabi-objcopy | Bin 920568 -> 1009240 bytes bin/arm-linux-androideabi-objdump | Bin 1164760 -> 1288888 bytes bin/arm-linux-androideabi-ranlib | Bin 763136 -> 846144 bytes bin/arm-linux-androideabi-readelf | Bin 441976 -> 502832 bytes bin/arm-linux-androideabi-size | Bin 735256 -> 818872 bytes bin/arm-linux-androideabi-strings | Bin 734584 -> 818296 bytes bin/arm-linux-androideabi-strip | Bin 920600 -> 1009240 bytes bin/real-arm-linux-androideabi-g++ | Bin 789000 -> 789000 bytes bin/real-arm-linux-androideabi-gcc | Bin 784904 -> 784904 bytes .../arm-linux-androideabi/4.9.x/armv7-a/crtbegin.o | Bin 2576 -> 2556 bytes .../4.9.x/armv7-a/crtbeginS.o | Bin 2792 -> 2772 bytes .../4.9.x/armv7-a/crtbeginT.o | Bin 2576 -> 2556 bytes .../arm-linux-androideabi/4.9.x/armv7-a/crtend.o | Bin 1096 -> 1096 bytes .../arm-linux-androideabi/4.9.x/armv7-a/crtendS.o | Bin 1096 -> 1096 bytes .../4.9.x/armv7-a/hard/crtbegin.o | Bin 2584 -> 2564 bytes .../4.9.x/armv7-a/hard/crtbeginS.o | Bin 2800 -> 2780 bytes .../4.9.x/armv7-a/hard/crtbeginT.o | Bin 2584 -> 2564 bytes .../4.9.x/armv7-a/hard/crtend.o | Bin 1104 -> 1104 bytes .../4.9.x/armv7-a/hard/crtendS.o | Bin 1104 -> 1104 bytes .../4.9.x/armv7-a/hard/libgcc.a | Bin 6126550 -> 6132318 bytes .../4.9.x/armv7-a/hard/libgcov.a | Bin 330482 -> 330434 bytes .../arm-linux-androideabi/4.9.x/armv7-a/libgcc.a | Bin 6125938 -> 6127602 bytes .../arm-linux-androideabi/4.9.x/armv7-a/libgcov.a | Bin 330334 -> 330210 bytes .../4.9.x/armv7-a/thumb/crtbegin.o | Bin 2452 -> 2432 bytes .../4.9.x/armv7-a/thumb/crtbeginS.o | Bin 2660 -> 2640 bytes .../4.9.x/armv7-a/thumb/crtbeginT.o | Bin 2452 -> 2432 bytes .../4.9.x/armv7-a/thumb/crtend.o | Bin 1096 -> 1096 bytes .../4.9.x/armv7-a/thumb/crtendS.o | Bin 1096 -> 1096 bytes .../4.9.x/armv7-a/thumb/hard/crtbegin.o | Bin 2460 -> 2440 bytes .../4.9.x/armv7-a/thumb/hard/crtbeginS.o | Bin 2668 -> 2648 bytes .../4.9.x/armv7-a/thumb/hard/crtbeginT.o | Bin 2460 -> 2440 bytes .../4.9.x/armv7-a/thumb/hard/crtend.o | Bin 1104 -> 1104 bytes .../4.9.x/armv7-a/thumb/hard/crtendS.o | Bin 1104 -> 1104 bytes .../4.9.x/armv7-a/thumb/hard/libgcc.a | Bin 6132084 -> 6135692 bytes .../4.9.x/armv7-a/thumb/hard/libgcov.a | Bin 324494 -> 324446 bytes .../4.9.x/armv7-a/thumb/libgcc.a | Bin 6129036 -> 6130612 bytes .../4.9.x/armv7-a/thumb/libgcov.a | Bin 324602 -> 324478 bytes lib/gcc/arm-linux-androideabi/4.9.x/crtbegin.o | Bin 2572 -> 2552 bytes lib/gcc/arm-linux-androideabi/4.9.x/crtbeginS.o | Bin 2788 -> 2768 bytes lib/gcc/arm-linux-androideabi/4.9.x/crtbeginT.o | Bin 2572 -> 2552 bytes lib/gcc/arm-linux-androideabi/4.9.x/crtend.o | Bin 1092 -> 1092 bytes lib/gcc/arm-linux-androideabi/4.9.x/crtendS.o | Bin 1092 -> 1092 bytes .../4.9.x/include-fixed/linux/a.out.h | 2 +- lib/gcc/arm-linux-androideabi/4.9.x/libgcc.a | Bin 6106606 -> 6108238 bytes lib/gcc/arm-linux-androideabi/4.9.x/libgcov.a | Bin 329838 -> 329714 bytes .../arm-linux-androideabi/4.9.x/thumb/crtbegin.o | Bin 2464 -> 2444 bytes .../arm-linux-androideabi/4.9.x/thumb/crtbeginS.o | Bin 2672 -> 2652 bytes .../arm-linux-androideabi/4.9.x/thumb/crtbeginT.o | Bin 2464 -> 2444 bytes lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtend.o | Bin 1092 -> 1092 bytes .../arm-linux-androideabi/4.9.x/thumb/crtendS.o | Bin 1092 -> 1092 bytes lib/gcc/arm-linux-androideabi/4.9.x/thumb/libgcc.a | Bin 6121938 -> 6123346 bytes .../arm-linux-androideabi/4.9.x/thumb/libgcov.a | Bin 323946 -> 323822 bytes libexec/gcc/arm-linux-androideabi/4.9.x/cc1 | Bin 16373896 -> 16373896 bytes libexec/gcc/arm-linux-androideabi/4.9.x/cc1plus | Bin 17508696 -> 17508696 bytes libexec/gcc/arm-linux-androideabi/4.9.x/collect2 | Bin 442632 -> 442632 bytes libexec/gcc/arm-linux-androideabi/4.9.x/lto1 | Bin 15631080 -> 15631080 bytes repo.prop | 10 ++-- 111 files changed, 677 insertions(+), 742 deletions(-) create mode 120000 arm-linux-androideabi/bin/readelf diff --git a/arm-linux-androideabi/bin/readelf b/arm-linux-androideabi/bin/readelf new file mode 120000 index 0000000..11ed9b6 --- /dev/null +++ b/arm-linux-androideabi/bin/readelf @@ -0,0 +1 @@ +../../bin/arm-linux-androideabi-readelf \ No newline at end of file diff --git a/arm-linux-androideabi/lib/armv7-a/hard/libatomic.a b/arm-linux-androideabi/lib/armv7-a/hard/libatomic.a index 8572769..51e2698 100644 Binary files a/arm-linux-androideabi/lib/armv7-a/hard/libatomic.a and b/arm-linux-androideabi/lib/armv7-a/hard/libatomic.a differ diff --git a/arm-linux-androideabi/lib/armv7-a/hard/libgomp.a b/arm-linux-androideabi/lib/armv7-a/hard/libgomp.a index 13c4532..3558e72 100644 Binary files a/arm-linux-androideabi/lib/armv7-a/hard/libgomp.a and b/arm-linux-androideabi/lib/armv7-a/hard/libgomp.a differ diff --git a/arm-linux-androideabi/lib/armv7-a/libatomic.a b/arm-linux-androideabi/lib/armv7-a/libatomic.a index fe07d2f..35a15a5 100644 Binary files a/arm-linux-androideabi/lib/armv7-a/libatomic.a and b/arm-linux-androideabi/lib/armv7-a/libatomic.a differ diff --git a/arm-linux-androideabi/lib/armv7-a/libgomp.a b/arm-linux-androideabi/lib/armv7-a/libgomp.a index cb9d471..ec2a6d4 100644 Binary files a/arm-linux-androideabi/lib/armv7-a/libgomp.a and b/arm-linux-androideabi/lib/armv7-a/libgomp.a differ diff --git a/arm-linux-androideabi/lib/armv7-a/thumb/hard/libatomic.a b/arm-linux-androideabi/lib/armv7-a/thumb/hard/libatomic.a index 5c1d835..a9b3152 100644 Binary files a/arm-linux-androideabi/lib/armv7-a/thumb/hard/libatomic.a and b/arm-linux-androideabi/lib/armv7-a/thumb/hard/libatomic.a differ diff --git a/arm-linux-androideabi/lib/armv7-a/thumb/hard/libgomp.a b/arm-linux-androideabi/lib/armv7-a/thumb/hard/libgomp.a index ded4e88..da84efa 100644 Binary files a/arm-linux-androideabi/lib/armv7-a/thumb/hard/libgomp.a and b/arm-linux-androideabi/lib/armv7-a/thumb/hard/libgomp.a differ diff --git a/arm-linux-androideabi/lib/armv7-a/thumb/libatomic.a b/arm-linux-androideabi/lib/armv7-a/thumb/libatomic.a index df39d65..eb02c11 100644 Binary files a/arm-linux-androideabi/lib/armv7-a/thumb/libatomic.a and b/arm-linux-androideabi/lib/armv7-a/thumb/libatomic.a differ diff --git a/arm-linux-androideabi/lib/armv7-a/thumb/libgomp.a b/arm-linux-androideabi/lib/armv7-a/thumb/libgomp.a index 50c5745..40ff591 100644 Binary files a/arm-linux-androideabi/lib/armv7-a/thumb/libgomp.a and b/arm-linux-androideabi/lib/armv7-a/thumb/libgomp.a differ diff --git a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.x b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.x index 04d195b..fa37249 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.x +++ b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.x @@ -1,6 +1,5 @@ /* Default linker script, for normal executables */ -/* Modified for Android. */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -8,10 +7,11 @@ OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) +SEARCH_DIR("=/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/arm-linux-androideabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - PROVIDE (__executable_start = 0x00010000); . = 0x00010000 + SIZEOF_HEADERS; + PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x00010000)); . = SEGMENT_START("text-segment", 0x00010000) + SIZEOF_HEADERS; .interp : { *(.interp) } .note.gnu.build-id : { *(.note.gnu.build-id) } .hash : { *(.hash) } @@ -95,50 +95,45 @@ SECTIONS 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)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ - . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); - PROVIDE_HIDDEN (__preinit_array_start = .); .preinit_array : { + PROVIDE_HIDDEN (__preinit_array_start = .); KEEP (*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); } - PROVIDE_HIDDEN (__preinit_array_end = .); - PROVIDE_HIDDEN (__init_array_start = .); .init_array : { - KEEP (*crtbegin*.o(.init_array)) + PROVIDE_HIDDEN (__init_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .ctors)) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) + PROVIDE_HIDDEN (__init_array_end = .); } - PROVIDE_HIDDEN (__init_array_end = .); - PROVIDE_HIDDEN (__fini_array_start = .); .fini_array : { - KEEP (*crtbegin*.o(.fini_array)) + PROVIDE_HIDDEN (__fini_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .dtors)) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) + PROVIDE_HIDDEN (__fini_array_end = .); } - PROVIDE_HIDDEN (__fini_array_end = .); .ctors : { /* gcc uses crtbegin.o to find the start of @@ -151,20 +146,20 @@ SECTIONS doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) - 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 (*(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 (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } @@ -190,17 +185,17 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); } _bss_end__ = . ; __bss_end__ = . ; . = ALIGN(32 / 8); . = SEGMENT_START("ldata-segment", .); . = ALIGN(32 / 8); __end__ = . ; - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); + _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -240,7 +235,8 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.mdebug.*) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xbn b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xbn index 4a05e8a..1921f3e 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xbn +++ b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xbn @@ -1,5 +1,5 @@ /* Script for -N: mix text and data on same page; don't align data */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -7,10 +7,11 @@ OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) +SEARCH_DIR("=/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/arm-linux-androideabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - PROVIDE (__executable_start = 0x00010000); . = 0x00010000 + SIZEOF_HEADERS; + PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x00010000)); . = SEGMENT_START("text-segment", 0x00010000) + SIZEOF_HEADERS; .interp : { *(.interp) } .note.gnu.build-id : { *(.note.gnu.build-id) } .hash : { *(.hash) } @@ -94,50 +95,45 @@ SECTIONS 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)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ + /* 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)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); - PROVIDE_HIDDEN (__preinit_array_start = .); .preinit_array : { + PROVIDE_HIDDEN (__preinit_array_start = .); KEEP (*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); } - PROVIDE_HIDDEN (__preinit_array_end = .); - PROVIDE_HIDDEN (__init_array_start = .); .init_array : { - KEEP (*crtbegin*.o(.init_array)) + PROVIDE_HIDDEN (__init_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .ctors)) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) + PROVIDE_HIDDEN (__init_array_end = .); } - PROVIDE_HIDDEN (__init_array_end = .); - PROVIDE_HIDDEN (__fini_array_start = .); .fini_array : { - KEEP (*crtbegin*.o(.fini_array)) + PROVIDE_HIDDEN (__fini_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .dtors)) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) + PROVIDE_HIDDEN (__fini_array_end = .); } - PROVIDE_HIDDEN (__fini_array_end = .); .ctors : { /* gcc uses crtbegin.o to find the start of @@ -150,20 +146,20 @@ SECTIONS doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) - 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 (*(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 (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } @@ -188,17 +184,17 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); } _bss_end__ = . ; __bss_end__ = . ; . = ALIGN(32 / 8); . = SEGMENT_START("ldata-segment", .); . = ALIGN(32 / 8); __end__ = . ; - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); + _end = .; PROVIDE (end = .); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } .stabstr 0 : { *(.stabstr) } @@ -237,7 +233,8 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.mdebug.*) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xc b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xc index 2aa9174..37afcb9 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xc +++ b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xc @@ -1,5 +1,5 @@ /* Script for -z combreloc: combine and sort reloc sections */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -7,10 +7,11 @@ OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) +SEARCH_DIR("=/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/arm-linux-androideabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - PROVIDE (__executable_start = 0x00010000); . = 0x00010000 + SIZEOF_HEADERS; + PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x00010000)); . = SEGMENT_START("text-segment", 0x00010000) + SIZEOF_HEADERS; .interp : { *(.interp) } .note.gnu.build-id : { *(.note.gnu.build-id) } .hash : { *(.hash) } @@ -93,50 +94,45 @@ SECTIONS 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)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ - . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); - PROVIDE_HIDDEN (__preinit_array_start = .); .preinit_array : { + PROVIDE_HIDDEN (__preinit_array_start = .); KEEP (*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); } - PROVIDE_HIDDEN (__preinit_array_end = .); - PROVIDE_HIDDEN (__init_array_start = .); .init_array : { - KEEP (*crtbegin*.o(.init_array)) + PROVIDE_HIDDEN (__init_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .ctors)) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) + PROVIDE_HIDDEN (__init_array_end = .); } - PROVIDE_HIDDEN (__init_array_end = .); - PROVIDE_HIDDEN (__fini_array_start = .); .fini_array : { - KEEP (*crtbegin*.o(.fini_array)) + PROVIDE_HIDDEN (__fini_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .dtors)) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) + PROVIDE_HIDDEN (__fini_array_end = .); } - PROVIDE_HIDDEN (__fini_array_end = .); .ctors : { /* gcc uses crtbegin.o to find the start of @@ -149,20 +145,20 @@ SECTIONS doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) - 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 (*(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 (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } @@ -188,17 +184,17 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); } _bss_end__ = . ; __bss_end__ = . ; . = ALIGN(32 / 8); . = SEGMENT_START("ldata-segment", .); . = ALIGN(32 / 8); __end__ = . ; - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); + _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -238,7 +234,8 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.mdebug.*) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xd b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xd index a49e267..ebb49d7 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xd +++ b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xd @@ -1,5 +1,5 @@ /* Script for ld -pie: link position independent executable */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -7,10 +7,11 @@ OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) +SEARCH_DIR("=/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/arm-linux-androideabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - PROVIDE (__executable_start = 0); . = 0 + SIZEOF_HEADERS; + PROVIDE (__executable_start = SEGMENT_START("text-segment", 0)); . = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS; .interp : { *(.interp) } .note.gnu.build-id : { *(.note.gnu.build-id) } .hash : { *(.hash) } @@ -94,50 +95,45 @@ SECTIONS 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)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ - . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); - PROVIDE_HIDDEN (__preinit_array_start = .); .preinit_array : { + PROVIDE_HIDDEN (__preinit_array_start = .); KEEP (*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); } - PROVIDE_HIDDEN (__preinit_array_end = .); - PROVIDE_HIDDEN (__init_array_start = .); .init_array : { - KEEP (*crtbegin*.o(.init_array)) + PROVIDE_HIDDEN (__init_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .ctors)) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) + PROVIDE_HIDDEN (__init_array_end = .); } - PROVIDE_HIDDEN (__init_array_end = .); - PROVIDE_HIDDEN (__fini_array_start = .); .fini_array : { - KEEP (*crtbegin*.o(.fini_array)) + PROVIDE_HIDDEN (__fini_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .dtors)) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) + PROVIDE_HIDDEN (__fini_array_end = .); } - PROVIDE_HIDDEN (__fini_array_end = .); .ctors : { /* gcc uses crtbegin.o to find the start of @@ -150,20 +146,20 @@ SECTIONS doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) - 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 (*(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 (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } @@ -189,17 +185,17 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); } _bss_end__ = . ; __bss_end__ = . ; . = ALIGN(32 / 8); . = SEGMENT_START("ldata-segment", .); . = ALIGN(32 / 8); __end__ = . ; - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); + _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -239,7 +235,8 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.mdebug.*) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xdc b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xdc index f90f0b3..d2f68ff 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xdc +++ b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xdc @@ -1,5 +1,5 @@ /* Script for -pie -z combreloc: position independent executable, combine & sort relocs */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -7,10 +7,11 @@ OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) +SEARCH_DIR("=/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/arm-linux-androideabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - PROVIDE (__executable_start = 0); . = 0 + SIZEOF_HEADERS; + PROVIDE (__executable_start = SEGMENT_START("text-segment", 0)); . = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS; .interp : { *(.interp) } .note.gnu.build-id : { *(.note.gnu.build-id) } .hash : { *(.hash) } @@ -93,50 +94,45 @@ SECTIONS 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)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ - . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); - PROVIDE_HIDDEN (__preinit_array_start = .); .preinit_array : { + PROVIDE_HIDDEN (__preinit_array_start = .); KEEP (*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); } - PROVIDE_HIDDEN (__preinit_array_end = .); - PROVIDE_HIDDEN (__init_array_start = .); .init_array : { - KEEP (*crtbegin*.o(.init_array)) + PROVIDE_HIDDEN (__init_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .ctors)) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) + PROVIDE_HIDDEN (__init_array_end = .); } - PROVIDE_HIDDEN (__init_array_end = .); - PROVIDE_HIDDEN (__fini_array_start = .); .fini_array : { - KEEP (*crtbegin*.o(.fini_array)) + PROVIDE_HIDDEN (__fini_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .dtors)) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) + PROVIDE_HIDDEN (__fini_array_end = .); } - PROVIDE_HIDDEN (__fini_array_end = .); .ctors : { /* gcc uses crtbegin.o to find the start of @@ -149,20 +145,20 @@ SECTIONS doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) - 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 (*(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 (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } @@ -188,17 +184,17 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); } _bss_end__ = . ; __bss_end__ = . ; . = ALIGN(32 / 8); . = SEGMENT_START("ldata-segment", .); . = ALIGN(32 / 8); __end__ = . ; - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); + _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -238,7 +234,8 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.mdebug.*) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xdw b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xdw index 056f45a..86cd580 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xdw +++ b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xdw @@ -1,5 +1,5 @@ /* Script for -pie -z combreloc -z now -z relro: position independent executable, combine & sort relocs */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -7,10 +7,11 @@ OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) +SEARCH_DIR("=/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/arm-linux-androideabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - PROVIDE (__executable_start = 0); . = 0 + SIZEOF_HEADERS; + PROVIDE (__executable_start = SEGMENT_START("text-segment", 0)); . = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS; .interp : { *(.interp) } .note.gnu.build-id : { *(.note.gnu.build-id) } .hash : { *(.hash) } @@ -93,50 +94,45 @@ SECTIONS 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)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ - . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); - PROVIDE_HIDDEN (__preinit_array_start = .); .preinit_array : { + PROVIDE_HIDDEN (__preinit_array_start = .); KEEP (*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); } - PROVIDE_HIDDEN (__preinit_array_end = .); - PROVIDE_HIDDEN (__init_array_start = .); .init_array : { - KEEP (*crtbegin*.o(.init_array)) + PROVIDE_HIDDEN (__init_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .ctors)) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) + PROVIDE_HIDDEN (__init_array_end = .); } - PROVIDE_HIDDEN (__init_array_end = .); - PROVIDE_HIDDEN (__fini_array_start = .); .fini_array : { - KEEP (*crtbegin*.o(.fini_array)) + PROVIDE_HIDDEN (__fini_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .dtors)) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) + PROVIDE_HIDDEN (__fini_array_end = .); } - PROVIDE_HIDDEN (__fini_array_end = .); .ctors : { /* gcc uses crtbegin.o to find the start of @@ -149,20 +145,20 @@ SECTIONS doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) - 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 (*(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 (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } @@ -188,17 +184,17 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); } _bss_end__ = . ; __bss_end__ = . ; . = ALIGN(32 / 8); . = SEGMENT_START("ldata-segment", .); . = ALIGN(32 / 8); __end__ = . ; - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); + _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -238,7 +234,8 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.mdebug.*) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xn b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xn index 5e64b79..228ceb6 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xn +++ b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xn @@ -1,5 +1,5 @@ /* Script for -n: mix text and data on same page */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -7,10 +7,11 @@ OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) +SEARCH_DIR("=/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/arm-linux-androideabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - PROVIDE (__executable_start = 0x00010000); . = 0x00010000 + SIZEOF_HEADERS; + PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x00010000)); . = SEGMENT_START("text-segment", 0x00010000) + SIZEOF_HEADERS; .interp : { *(.interp) } .note.gnu.build-id : { *(.note.gnu.build-id) } .hash : { *(.hash) } @@ -94,50 +95,45 @@ SECTIONS 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)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ - . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); - PROVIDE_HIDDEN (__preinit_array_start = .); .preinit_array : { + PROVIDE_HIDDEN (__preinit_array_start = .); KEEP (*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); } - PROVIDE_HIDDEN (__preinit_array_end = .); - PROVIDE_HIDDEN (__init_array_start = .); .init_array : { - KEEP (*crtbegin*.o(.init_array)) + PROVIDE_HIDDEN (__init_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .ctors)) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) + PROVIDE_HIDDEN (__init_array_end = .); } - PROVIDE_HIDDEN (__init_array_end = .); - PROVIDE_HIDDEN (__fini_array_start = .); .fini_array : { - KEEP (*crtbegin*.o(.fini_array)) + PROVIDE_HIDDEN (__fini_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .dtors)) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) + PROVIDE_HIDDEN (__fini_array_end = .); } - PROVIDE_HIDDEN (__fini_array_end = .); .ctors : { /* gcc uses crtbegin.o to find the start of @@ -150,20 +146,20 @@ SECTIONS doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) - 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 (*(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 (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } @@ -189,17 +185,17 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); } _bss_end__ = . ; __bss_end__ = . ; . = ALIGN(32 / 8); . = SEGMENT_START("ldata-segment", .); . = ALIGN(32 / 8); __end__ = . ; - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); + _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -239,7 +235,8 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.mdebug.*) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xr b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xr index d48d4ec..75e7914 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xr +++ b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xr @@ -1,5 +1,5 @@ /* Script for ld -r: link without relocation */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -82,26 +82,24 @@ SECTIONS .rodata1 0 : { *(.rodata1) } .ARM.extab 0 : { *(.ARM.extab) } .ARM.exidx 0 : { *(.ARM.exidx) } - .eh_frame_hdr : { *(.eh_frame_hdr) } - .eh_frame 0 : ONLY_IF_RO { KEEP (*(.eh_frame)) } + .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.*) } + .gnu_extab 0 : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ + /* 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)) } + .eh_frame 0 : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .gnu_extab 0 : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ .preinit_array 0 : { KEEP (*(.preinit_array)) @@ -121,7 +119,9 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ + .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. */ } /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -161,6 +161,7 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xs b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xs index ef80780..f65cd4b 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xs +++ b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xs @@ -1,5 +1,5 @@ /* Script for ld --shared: link shared library */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -7,10 +7,11 @@ OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) +SEARCH_DIR("=/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/arm-linux-androideabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - . = 0 + SIZEOF_HEADERS; + . = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS; .note.gnu.build-id : { *(.note.gnu.build-id) } .hash : { *(.hash) } .gnu.hash : { *(.gnu.hash) } @@ -89,43 +90,38 @@ SECTIONS 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)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ - . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); .preinit_array : { KEEP (*(.preinit_array)) } .init_array : { - KEEP (*crtbegin*.o(.init_array)) KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .ctors)) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) } .fini_array : { - KEEP (*crtbegin*.o(.fini_array)) KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .dtors)) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) } .ctors : { @@ -139,20 +135,20 @@ SECTIONS doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) - 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 (*(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 (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } @@ -178,17 +174,17 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); } _bss_end__ = . ; __bss_end__ = . ; . = ALIGN(32 / 8); . = SEGMENT_START("ldata-segment", .); . = ALIGN(32 / 8); __end__ = . ; - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); + _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -228,7 +224,8 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.mdebug.*) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xsc b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xsc index fcc8641..6e89a5d 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xsc +++ b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xsc @@ -1,6 +1,5 @@ /* Script for --shared -z combreloc: shared library, combine & sort relocs */ -/* Modified for Android. */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -8,10 +7,11 @@ OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) +SEARCH_DIR("=/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/arm-linux-androideabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - . = 0 + SIZEOF_HEADERS; + . = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS; .note.gnu.build-id : { *(.note.gnu.build-id) } .hash : { *(.hash) } .gnu.hash : { *(.gnu.hash) } @@ -89,43 +89,38 @@ SECTIONS 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)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ - . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); .preinit_array : { KEEP (*(.preinit_array)) } .init_array : { - KEEP (*crtbegin*.o(.init_array)) KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .ctors)) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) } .fini_array : { - KEEP (*crtbegin*.o(.fini_array)) KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .dtors)) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) } .ctors : { @@ -139,20 +134,20 @@ SECTIONS doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) - 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 (*(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 (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } @@ -178,17 +173,17 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); } _bss_end__ = . ; __bss_end__ = . ; . = ALIGN(32 / 8); . = SEGMENT_START("ldata-segment", .); . = ALIGN(32 / 8); __end__ = . ; - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); + _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -228,7 +223,8 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.mdebug.*) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xsw b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xsw index c89c021..cd5eb72 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xsw +++ b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xsw @@ -1,5 +1,5 @@ /* Script for --shared -z combreloc -z now -z relro: shared library, combine & sort relocs */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -7,10 +7,11 @@ OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) +SEARCH_DIR("=/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/arm-linux-androideabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - . = 0 + SIZEOF_HEADERS; + . = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS; .note.gnu.build-id : { *(.note.gnu.build-id) } .hash : { *(.hash) } .gnu.hash : { *(.gnu.hash) } @@ -88,43 +89,38 @@ SECTIONS 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)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ - . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); .preinit_array : { KEEP (*(.preinit_array)) } .init_array : { - KEEP (*crtbegin*.o(.init_array)) KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .ctors)) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) } .fini_array : { - KEEP (*crtbegin*.o(.fini_array)) KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .dtors)) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) } .ctors : { @@ -138,20 +134,20 @@ SECTIONS doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) - 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 (*(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 (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } @@ -177,17 +173,17 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); } _bss_end__ = . ; __bss_end__ = . ; . = ALIGN(32 / 8); . = SEGMENT_START("ldata-segment", .); . = ALIGN(32 / 8); __end__ = . ; - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); + _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -227,7 +223,8 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.mdebug.*) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xu b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xu index 52d639e..3a87e08 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xu +++ b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xu @@ -1,5 +1,5 @@ /* Script for ld -Ur: link w/out relocation, do create constructors */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -82,26 +82,24 @@ SECTIONS .rodata1 0 : { *(.rodata1) } .ARM.extab 0 : { *(.ARM.extab) } .ARM.exidx 0 : { *(.ARM.exidx) } - .eh_frame_hdr : { *(.eh_frame_hdr) } - .eh_frame 0 : ONLY_IF_RO { KEEP (*(.eh_frame)) } + .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.*) } + .gnu_extab 0 : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ + /* 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)) } + .eh_frame 0 : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .gnu_extab 0 : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ .preinit_array 0 : { KEEP (*(.preinit_array)) @@ -122,7 +120,9 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ + .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. */ } /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -162,6 +162,7 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xw b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xw index f7418bd..3ad52aa 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xw +++ b/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.xw @@ -1,5 +1,5 @@ /* Script for -z combreloc -z now -z relro: combine and sort reloc sections */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -7,10 +7,11 @@ OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) +SEARCH_DIR("=/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/arm-linux-androideabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - PROVIDE (__executable_start = 0x00010000); . = 0x00010000 + SIZEOF_HEADERS; + PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x00010000)); . = SEGMENT_START("text-segment", 0x00010000) + SIZEOF_HEADERS; .interp : { *(.interp) } .note.gnu.build-id : { *(.note.gnu.build-id) } .hash : { *(.hash) } @@ -93,50 +94,45 @@ SECTIONS 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)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ - . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); - PROVIDE_HIDDEN (__preinit_array_start = .); .preinit_array : { + PROVIDE_HIDDEN (__preinit_array_start = .); KEEP (*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); } - PROVIDE_HIDDEN (__preinit_array_end = .); - PROVIDE_HIDDEN (__init_array_start = .); .init_array : { - KEEP (*crtbegin*.o(.init_array)) + PROVIDE_HIDDEN (__init_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .ctors)) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) + PROVIDE_HIDDEN (__init_array_end = .); } - PROVIDE_HIDDEN (__init_array_end = .); - PROVIDE_HIDDEN (__fini_array_start = .); .fini_array : { - KEEP (*crtbegin*.o(.fini_array)) + PROVIDE_HIDDEN (__fini_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .dtors)) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) + PROVIDE_HIDDEN (__fini_array_end = .); } - PROVIDE_HIDDEN (__fini_array_end = .); .ctors : { /* gcc uses crtbegin.o to find the start of @@ -149,20 +145,20 @@ SECTIONS doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) - 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 (*(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 (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } @@ -188,17 +184,17 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); } _bss_end__ = . ; __bss_end__ = . ; . = ALIGN(32 / 8); . = SEGMENT_START("ldata-segment", .); . = ALIGN(32 / 8); __end__ = . ; - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); + _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -238,7 +234,8 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.mdebug.*) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.x b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.x index 80f3ea8..f778f17 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.x +++ b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.x @@ -1,6 +1,5 @@ /* Default linker script, for normal executables */ -/* Modified for Android. */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -8,10 +7,11 @@ OUTPUT_FORMAT("elf32-bigarm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) +SEARCH_DIR("=/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/arm-linux-androideabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - PROVIDE (__executable_start = 0x00010000); . = 0x00010000 + SIZEOF_HEADERS; + PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x00010000)); . = SEGMENT_START("text-segment", 0x00010000) + SIZEOF_HEADERS; .interp : { *(.interp) } .note.gnu.build-id : { *(.note.gnu.build-id) } .hash : { *(.hash) } @@ -95,50 +95,45 @@ SECTIONS 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)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ - . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); - PROVIDE_HIDDEN (__preinit_array_start = .); .preinit_array : { + PROVIDE_HIDDEN (__preinit_array_start = .); KEEP (*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); } - PROVIDE_HIDDEN (__preinit_array_end = .); - PROVIDE_HIDDEN (__init_array_start = .); .init_array : { - KEEP (*crtbegin*.o(.init_array)) + PROVIDE_HIDDEN (__init_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .ctors)) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) + PROVIDE_HIDDEN (__init_array_end = .); } - PROVIDE_HIDDEN (__init_array_end = .); - PROVIDE_HIDDEN (__fini_array_start = .); .fini_array : { - KEEP (*crtbegin*.o(.fini_array)) + PROVIDE_HIDDEN (__fini_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .dtors)) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) + PROVIDE_HIDDEN (__fini_array_end = .); } - PROVIDE_HIDDEN (__fini_array_end = .); .ctors : { /* gcc uses crtbegin.o to find the start of @@ -151,20 +146,20 @@ SECTIONS doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) - 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 (*(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 (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } @@ -190,17 +185,17 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); } _bss_end__ = . ; __bss_end__ = . ; . = ALIGN(32 / 8); . = SEGMENT_START("ldata-segment", .); . = ALIGN(32 / 8); __end__ = . ; - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); + _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -240,7 +235,8 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.mdebug.*) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xbn b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xbn index fdda7f3..bc01628 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xbn +++ b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xbn @@ -1,5 +1,5 @@ /* Script for -N: mix text and data on same page; don't align data */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -7,10 +7,11 @@ OUTPUT_FORMAT("elf32-bigarm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) +SEARCH_DIR("=/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/arm-linux-androideabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - PROVIDE (__executable_start = 0x00010000); . = 0x00010000 + SIZEOF_HEADERS; + PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x00010000)); . = SEGMENT_START("text-segment", 0x00010000) + SIZEOF_HEADERS; .interp : { *(.interp) } .note.gnu.build-id : { *(.note.gnu.build-id) } .hash : { *(.hash) } @@ -94,50 +95,45 @@ SECTIONS 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)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ + /* 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)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); - PROVIDE_HIDDEN (__preinit_array_start = .); .preinit_array : { + PROVIDE_HIDDEN (__preinit_array_start = .); KEEP (*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); } - PROVIDE_HIDDEN (__preinit_array_end = .); - PROVIDE_HIDDEN (__init_array_start = .); .init_array : { - KEEP (*crtbegin*.o(.init_array)) + PROVIDE_HIDDEN (__init_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .ctors)) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) + PROVIDE_HIDDEN (__init_array_end = .); } - PROVIDE_HIDDEN (__init_array_end = .); - PROVIDE_HIDDEN (__fini_array_start = .); .fini_array : { - KEEP (*crtbegin*.o(.fini_array)) + PROVIDE_HIDDEN (__fini_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .dtors)) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) + PROVIDE_HIDDEN (__fini_array_end = .); } - PROVIDE_HIDDEN (__fini_array_end = .); .ctors : { /* gcc uses crtbegin.o to find the start of @@ -150,20 +146,20 @@ SECTIONS doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) - 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 (*(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 (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } @@ -188,17 +184,17 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); } _bss_end__ = . ; __bss_end__ = . ; . = ALIGN(32 / 8); . = SEGMENT_START("ldata-segment", .); . = ALIGN(32 / 8); __end__ = . ; - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); + _end = .; PROVIDE (end = .); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } .stabstr 0 : { *(.stabstr) } @@ -237,7 +233,8 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.mdebug.*) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xc b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xc index 1bf56a2..71542ab 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xc +++ b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xc @@ -1,5 +1,5 @@ /* Script for -z combreloc: combine and sort reloc sections */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -7,10 +7,11 @@ OUTPUT_FORMAT("elf32-bigarm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) +SEARCH_DIR("=/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/arm-linux-androideabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - PROVIDE (__executable_start = 0x00010000); . = 0x00010000 + SIZEOF_HEADERS; + PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x00010000)); . = SEGMENT_START("text-segment", 0x00010000) + SIZEOF_HEADERS; .interp : { *(.interp) } .note.gnu.build-id : { *(.note.gnu.build-id) } .hash : { *(.hash) } @@ -93,50 +94,45 @@ SECTIONS 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)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ - . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); - PROVIDE_HIDDEN (__preinit_array_start = .); .preinit_array : { + PROVIDE_HIDDEN (__preinit_array_start = .); KEEP (*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); } - PROVIDE_HIDDEN (__preinit_array_end = .); - PROVIDE_HIDDEN (__init_array_start = .); .init_array : { - KEEP (*crtbegin*.o(.init_array)) + PROVIDE_HIDDEN (__init_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .ctors)) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) + PROVIDE_HIDDEN (__init_array_end = .); } - PROVIDE_HIDDEN (__init_array_end = .); - PROVIDE_HIDDEN (__fini_array_start = .); .fini_array : { - KEEP (*crtbegin*.o(.fini_array)) + PROVIDE_HIDDEN (__fini_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .dtors)) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) + PROVIDE_HIDDEN (__fini_array_end = .); } - PROVIDE_HIDDEN (__fini_array_end = .); .ctors : { /* gcc uses crtbegin.o to find the start of @@ -149,20 +145,20 @@ SECTIONS doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) - 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 (*(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 (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } @@ -188,17 +184,17 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); } _bss_end__ = . ; __bss_end__ = . ; . = ALIGN(32 / 8); . = SEGMENT_START("ldata-segment", .); . = ALIGN(32 / 8); __end__ = . ; - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); + _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -238,7 +234,8 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.mdebug.*) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xd b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xd index 2600399..cfeabb7 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xd +++ b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xd @@ -1,5 +1,5 @@ /* Script for ld -pie: link position independent executable */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -7,10 +7,11 @@ OUTPUT_FORMAT("elf32-bigarm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) +SEARCH_DIR("=/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/arm-linux-androideabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - PROVIDE (__executable_start = 0); . = 0 + SIZEOF_HEADERS; + PROVIDE (__executable_start = SEGMENT_START("text-segment", 0)); . = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS; .interp : { *(.interp) } .note.gnu.build-id : { *(.note.gnu.build-id) } .hash : { *(.hash) } @@ -94,50 +95,45 @@ SECTIONS 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)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ - . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); - PROVIDE_HIDDEN (__preinit_array_start = .); .preinit_array : { + PROVIDE_HIDDEN (__preinit_array_start = .); KEEP (*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); } - PROVIDE_HIDDEN (__preinit_array_end = .); - PROVIDE_HIDDEN (__init_array_start = .); .init_array : { - KEEP (*crtbegin*.o(.init_array)) + PROVIDE_HIDDEN (__init_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .ctors)) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) + PROVIDE_HIDDEN (__init_array_end = .); } - PROVIDE_HIDDEN (__init_array_end = .); - PROVIDE_HIDDEN (__fini_array_start = .); .fini_array : { - KEEP (*crtbegin*.o(.fini_array)) + PROVIDE_HIDDEN (__fini_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .dtors)) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) + PROVIDE_HIDDEN (__fini_array_end = .); } - PROVIDE_HIDDEN (__fini_array_end = .); .ctors : { /* gcc uses crtbegin.o to find the start of @@ -150,20 +146,20 @@ SECTIONS doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) - 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 (*(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 (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } @@ -189,17 +185,17 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); } _bss_end__ = . ; __bss_end__ = . ; . = ALIGN(32 / 8); . = SEGMENT_START("ldata-segment", .); . = ALIGN(32 / 8); __end__ = . ; - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); + _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -239,7 +235,8 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.mdebug.*) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xdc b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xdc index c1b5373..02f81fb 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xdc +++ b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xdc @@ -1,5 +1,5 @@ /* Script for -pie -z combreloc: position independent executable, combine & sort relocs */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -7,10 +7,11 @@ OUTPUT_FORMAT("elf32-bigarm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) +SEARCH_DIR("=/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/arm-linux-androideabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - PROVIDE (__executable_start = 0); . = 0 + SIZEOF_HEADERS; + PROVIDE (__executable_start = SEGMENT_START("text-segment", 0)); . = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS; .interp : { *(.interp) } .note.gnu.build-id : { *(.note.gnu.build-id) } .hash : { *(.hash) } @@ -93,50 +94,45 @@ SECTIONS 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)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ - . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); - PROVIDE_HIDDEN (__preinit_array_start = .); .preinit_array : { + PROVIDE_HIDDEN (__preinit_array_start = .); KEEP (*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); } - PROVIDE_HIDDEN (__preinit_array_end = .); - PROVIDE_HIDDEN (__init_array_start = .); .init_array : { - KEEP (*crtbegin*.o(.init_array)) + PROVIDE_HIDDEN (__init_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .ctors)) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) + PROVIDE_HIDDEN (__init_array_end = .); } - PROVIDE_HIDDEN (__init_array_end = .); - PROVIDE_HIDDEN (__fini_array_start = .); .fini_array : { - KEEP (*crtbegin*.o(.fini_array)) + PROVIDE_HIDDEN (__fini_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .dtors)) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) + PROVIDE_HIDDEN (__fini_array_end = .); } - PROVIDE_HIDDEN (__fini_array_end = .); .ctors : { /* gcc uses crtbegin.o to find the start of @@ -149,20 +145,20 @@ SECTIONS doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) - 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 (*(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 (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } @@ -188,17 +184,17 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); } _bss_end__ = . ; __bss_end__ = . ; . = ALIGN(32 / 8); . = SEGMENT_START("ldata-segment", .); . = ALIGN(32 / 8); __end__ = . ; - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); + _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -238,7 +234,8 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.mdebug.*) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xdw b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xdw index bf01d44..eca32b4 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xdw +++ b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xdw @@ -1,5 +1,5 @@ /* Script for -pie -z combreloc -z now -z relro: position independent executable, combine & sort relocs */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -7,10 +7,11 @@ OUTPUT_FORMAT("elf32-bigarm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) +SEARCH_DIR("=/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/arm-linux-androideabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - PROVIDE (__executable_start = 0); . = 0 + SIZEOF_HEADERS; + PROVIDE (__executable_start = SEGMENT_START("text-segment", 0)); . = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS; .interp : { *(.interp) } .note.gnu.build-id : { *(.note.gnu.build-id) } .hash : { *(.hash) } @@ -93,50 +94,45 @@ SECTIONS 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)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ - . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); - PROVIDE_HIDDEN (__preinit_array_start = .); .preinit_array : { + PROVIDE_HIDDEN (__preinit_array_start = .); KEEP (*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); } - PROVIDE_HIDDEN (__preinit_array_end = .); - PROVIDE_HIDDEN (__init_array_start = .); .init_array : { - KEEP (*crtbegin*.o(.init_array)) + PROVIDE_HIDDEN (__init_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .ctors)) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) + PROVIDE_HIDDEN (__init_array_end = .); } - PROVIDE_HIDDEN (__init_array_end = .); - PROVIDE_HIDDEN (__fini_array_start = .); .fini_array : { - KEEP (*crtbegin*.o(.fini_array)) + PROVIDE_HIDDEN (__fini_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .dtors)) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) + PROVIDE_HIDDEN (__fini_array_end = .); } - PROVIDE_HIDDEN (__fini_array_end = .); .ctors : { /* gcc uses crtbegin.o to find the start of @@ -149,20 +145,20 @@ SECTIONS doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) - 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 (*(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 (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } @@ -188,17 +184,17 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); } _bss_end__ = . ; __bss_end__ = . ; . = ALIGN(32 / 8); . = SEGMENT_START("ldata-segment", .); . = ALIGN(32 / 8); __end__ = . ; - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); + _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -238,7 +234,8 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.mdebug.*) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xn b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xn index cc38f15..83da038 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xn +++ b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xn @@ -1,5 +1,5 @@ /* Script for -n: mix text and data on same page */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -7,10 +7,11 @@ OUTPUT_FORMAT("elf32-bigarm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) +SEARCH_DIR("=/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/arm-linux-androideabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - PROVIDE (__executable_start = 0x00010000); . = 0x00010000 + SIZEOF_HEADERS; + PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x00010000)); . = SEGMENT_START("text-segment", 0x00010000) + SIZEOF_HEADERS; .interp : { *(.interp) } .note.gnu.build-id : { *(.note.gnu.build-id) } .hash : { *(.hash) } @@ -94,50 +95,45 @@ SECTIONS 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)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ - . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); - PROVIDE_HIDDEN (__preinit_array_start = .); .preinit_array : { + PROVIDE_HIDDEN (__preinit_array_start = .); KEEP (*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); } - PROVIDE_HIDDEN (__preinit_array_end = .); - PROVIDE_HIDDEN (__init_array_start = .); .init_array : { - KEEP (*crtbegin*.o(.init_array)) + PROVIDE_HIDDEN (__init_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .ctors)) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) + PROVIDE_HIDDEN (__init_array_end = .); } - PROVIDE_HIDDEN (__init_array_end = .); - PROVIDE_HIDDEN (__fini_array_start = .); .fini_array : { - KEEP (*crtbegin*.o(.fini_array)) + PROVIDE_HIDDEN (__fini_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .dtors)) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) + PROVIDE_HIDDEN (__fini_array_end = .); } - PROVIDE_HIDDEN (__fini_array_end = .); .ctors : { /* gcc uses crtbegin.o to find the start of @@ -150,20 +146,20 @@ SECTIONS doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) - 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 (*(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 (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } @@ -189,17 +185,17 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); } _bss_end__ = . ; __bss_end__ = . ; . = ALIGN(32 / 8); . = SEGMENT_START("ldata-segment", .); . = ALIGN(32 / 8); __end__ = . ; - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); + _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -239,7 +235,8 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.mdebug.*) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xr b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xr index c3b0497..daee56a 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xr +++ b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xr @@ -1,5 +1,5 @@ /* Script for ld -r: link without relocation */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -82,26 +82,24 @@ SECTIONS .rodata1 0 : { *(.rodata1) } .ARM.extab 0 : { *(.ARM.extab) } .ARM.exidx 0 : { *(.ARM.exidx) } - .eh_frame_hdr : { *(.eh_frame_hdr) } - .eh_frame 0 : ONLY_IF_RO { KEEP (*(.eh_frame)) } + .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.*) } + .gnu_extab 0 : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ + /* 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)) } + .eh_frame 0 : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .gnu_extab 0 : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ .preinit_array 0 : { KEEP (*(.preinit_array)) @@ -121,7 +119,9 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ + .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. */ } /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -161,6 +161,7 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xs b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xs index ec4930d..776441b 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xs +++ b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xs @@ -1,5 +1,5 @@ /* Script for ld --shared: link shared library */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -7,10 +7,11 @@ OUTPUT_FORMAT("elf32-bigarm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) +SEARCH_DIR("=/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/arm-linux-androideabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - . = 0 + SIZEOF_HEADERS; + . = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS; .note.gnu.build-id : { *(.note.gnu.build-id) } .hash : { *(.hash) } .gnu.hash : { *(.gnu.hash) } @@ -89,43 +90,38 @@ SECTIONS 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)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ - . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); .preinit_array : { KEEP (*(.preinit_array)) } .init_array : { - KEEP (*crtbegin*.o(.init_array)) KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .ctors)) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) } .fini_array : { - KEEP (*crtbegin*.o(.fini_array)) KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .dtors)) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) } .ctors : { @@ -139,20 +135,20 @@ SECTIONS doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) - 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 (*(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 (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } @@ -178,17 +174,17 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); } _bss_end__ = . ; __bss_end__ = . ; . = ALIGN(32 / 8); . = SEGMENT_START("ldata-segment", .); . = ALIGN(32 / 8); __end__ = . ; - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); + _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -228,7 +224,8 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.mdebug.*) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xsc b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xsc index f2a0b09..e21c38d 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xsc +++ b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xsc @@ -1,6 +1,5 @@ /* Script for --shared -z combreloc: shared library, combine & sort relocs */ -/* Modified for Android. */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -8,10 +7,11 @@ OUTPUT_FORMAT("elf32-bigarm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) +SEARCH_DIR("=/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/arm-linux-androideabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - . = 0 + SIZEOF_HEADERS; + . = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS; .note.gnu.build-id : { *(.note.gnu.build-id) } .hash : { *(.hash) } .gnu.hash : { *(.gnu.hash) } @@ -89,43 +89,38 @@ SECTIONS 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)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ - . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); .preinit_array : { KEEP (*(.preinit_array)) } .init_array : { - KEEP (*crtbegin*.o(.init_array)) KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .ctors)) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) } .fini_array : { - KEEP (*crtbegin*.o(.fini_array)) KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .dtors)) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) } .ctors : { @@ -139,20 +134,20 @@ SECTIONS doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) - 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 (*(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 (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } @@ -178,17 +173,17 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); } _bss_end__ = . ; __bss_end__ = . ; . = ALIGN(32 / 8); . = SEGMENT_START("ldata-segment", .); . = ALIGN(32 / 8); __end__ = . ; - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); + _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -228,7 +223,8 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.mdebug.*) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xsw b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xsw index aaab571..1258782 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xsw +++ b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xsw @@ -1,5 +1,5 @@ /* Script for --shared -z combreloc -z now -z relro: shared library, combine & sort relocs */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -7,10 +7,11 @@ OUTPUT_FORMAT("elf32-bigarm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) +SEARCH_DIR("=/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/arm-linux-androideabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - . = 0 + SIZEOF_HEADERS; + . = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS; .note.gnu.build-id : { *(.note.gnu.build-id) } .hash : { *(.hash) } .gnu.hash : { *(.gnu.hash) } @@ -88,43 +89,38 @@ SECTIONS 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)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ - . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); .preinit_array : { KEEP (*(.preinit_array)) } .init_array : { - KEEP (*crtbegin*.o(.init_array)) KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .ctors)) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) } .fini_array : { - KEEP (*crtbegin*.o(.fini_array)) KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .dtors)) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) } .ctors : { @@ -138,20 +134,20 @@ SECTIONS doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) - 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 (*(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 (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } @@ -177,17 +173,17 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); } _bss_end__ = . ; __bss_end__ = . ; . = ALIGN(32 / 8); . = SEGMENT_START("ldata-segment", .); . = ALIGN(32 / 8); __end__ = . ; - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); + _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -227,7 +223,8 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.mdebug.*) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xu b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xu index 7de1661..ee30894 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xu +++ b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xu @@ -1,5 +1,5 @@ /* Script for ld -Ur: link w/out relocation, do create constructors */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -82,26 +82,24 @@ SECTIONS .rodata1 0 : { *(.rodata1) } .ARM.extab 0 : { *(.ARM.extab) } .ARM.exidx 0 : { *(.ARM.exidx) } - .eh_frame_hdr : { *(.eh_frame_hdr) } - .eh_frame 0 : ONLY_IF_RO { KEEP (*(.eh_frame)) } + .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.*) } + .gnu_extab 0 : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ + /* 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)) } + .eh_frame 0 : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .gnu_extab 0 : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ .preinit_array 0 : { KEEP (*(.preinit_array)) @@ -122,7 +120,9 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ + .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. */ } /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -162,6 +162,7 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } } diff --git a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xw b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xw index f9550bf..e92684f 100644 --- a/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xw +++ b/arm-linux-androideabi/lib/ldscripts/armelfb_linux_eabi.xw @@ -1,5 +1,5 @@ /* Script for -z combreloc -z now -z relro: combine and sort reloc sections */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2016 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -7,10 +7,11 @@ OUTPUT_FORMAT("elf32-bigarm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) +SEARCH_DIR("=/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/arm-linux-androideabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - PROVIDE (__executable_start = 0x00010000); . = 0x00010000 + SIZEOF_HEADERS; + PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x00010000)); . = SEGMENT_START("text-segment", 0x00010000) + SIZEOF_HEADERS; .interp : { *(.interp) } .note.gnu.build-id : { *(.note.gnu.build-id) } .hash : { *(.hash) } @@ -93,50 +94,45 @@ SECTIONS 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)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* 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. For 32 bits we want to align - at exactly a page boundary to make life easier for apriori. */ - . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .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) } - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to - be empty, which isn't pretty. */ - . = ALIGN(32 / 8); - PROVIDE_HIDDEN (__preinit_array_start = .); .preinit_array : { + PROVIDE_HIDDEN (__preinit_array_start = .); KEEP (*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); } - PROVIDE_HIDDEN (__preinit_array_end = .); - PROVIDE_HIDDEN (__init_array_start = .); .init_array : { - KEEP (*crtbegin*.o(.init_array)) + PROVIDE_HIDDEN (__init_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .ctors)) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) + PROVIDE_HIDDEN (__init_array_end = .); } - PROVIDE_HIDDEN (__init_array_end = .); - PROVIDE_HIDDEN (__fini_array_start = .); .fini_array : { - KEEP (*crtbegin*.o(.fini_array)) + PROVIDE_HIDDEN (__fini_array_start = .); KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin*.o *crtend.o *crtend*.o ) .dtors)) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) + PROVIDE_HIDDEN (__fini_array_end = .); } - PROVIDE_HIDDEN (__fini_array_end = .); .ctors : { /* gcc uses crtbegin.o to find the start of @@ -149,20 +145,20 @@ SECTIONS doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) - 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 (*(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 (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } @@ -188,17 +184,17 @@ SECTIONS *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ - . = ALIGN(32 / 8); + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); } _bss_end__ = . ; __bss_end__ = . ; . = ALIGN(32 / 8); . = SEGMENT_START("ldata-segment", .); . = ALIGN(32 / 8); __end__ = . ; - _end = .; - _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; - PROVIDE (end = .); + _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -238,7 +234,8 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.mdebug.*) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } } diff --git a/arm-linux-androideabi/lib/libatomic.a b/arm-linux-androideabi/lib/libatomic.a index e63f43b..0a1baa0 100644 Binary files a/arm-linux-androideabi/lib/libatomic.a and b/arm-linux-androideabi/lib/libatomic.a differ diff --git a/arm-linux-androideabi/lib/libgomp.a b/arm-linux-androideabi/lib/libgomp.a index 0b0dce6..6171839 100644 Binary files a/arm-linux-androideabi/lib/libgomp.a and b/arm-linux-androideabi/lib/libgomp.a differ diff --git a/arm-linux-androideabi/lib/thumb/libatomic.a b/arm-linux-androideabi/lib/thumb/libatomic.a index 3ec585e..4d10dab 100644 Binary files a/arm-linux-androideabi/lib/thumb/libatomic.a and b/arm-linux-androideabi/lib/thumb/libatomic.a differ diff --git a/arm-linux-androideabi/lib/thumb/libgomp.a b/arm-linux-androideabi/lib/thumb/libgomp.a index 3294d14..77ce381 100644 Binary files a/arm-linux-androideabi/lib/thumb/libgomp.a and b/arm-linux-androideabi/lib/thumb/libgomp.a differ diff --git a/bin/arm-linux-androideabi-addr2line b/bin/arm-linux-androideabi-addr2line index fb3ca6f..960cd6e 100755 Binary files a/bin/arm-linux-androideabi-addr2line and b/bin/arm-linux-androideabi-addr2line differ diff --git a/bin/arm-linux-androideabi-ar b/bin/arm-linux-androideabi-ar index d07129b..33a3e60 100755 Binary files a/bin/arm-linux-androideabi-ar and b/bin/arm-linux-androideabi-ar differ diff --git a/bin/arm-linux-androideabi-as b/bin/arm-linux-androideabi-as index 6d8eeee..cece221 100755 Binary files a/bin/arm-linux-androideabi-as and b/bin/arm-linux-androideabi-as differ diff --git a/bin/arm-linux-androideabi-c++filt b/bin/arm-linux-androideabi-c++filt index dcf040d..f0f118a 100755 Binary files a/bin/arm-linux-androideabi-c++filt and b/bin/arm-linux-androideabi-c++filt differ diff --git a/bin/arm-linux-androideabi-cpp b/bin/arm-linux-androideabi-cpp index 95fe92a..c11bbf4 100755 Binary files a/bin/arm-linux-androideabi-cpp and b/bin/arm-linux-androideabi-cpp differ diff --git a/bin/arm-linux-androideabi-dwp b/bin/arm-linux-androideabi-dwp index dc3fe3f..36d4a1c 100755 Binary files a/bin/arm-linux-androideabi-dwp and b/bin/arm-linux-androideabi-dwp differ diff --git a/bin/arm-linux-androideabi-elfedit b/bin/arm-linux-androideabi-elfedit index 63bbfff..83da4a1 100755 Binary files a/bin/arm-linux-androideabi-elfedit and b/bin/arm-linux-androideabi-elfedit differ diff --git a/bin/arm-linux-androideabi-gcc-4.9.x b/bin/arm-linux-androideabi-gcc-4.9.x index 85a948f..ce8ed42 100755 Binary files a/bin/arm-linux-androideabi-gcc-4.9.x and b/bin/arm-linux-androideabi-gcc-4.9.x differ diff --git a/bin/arm-linux-androideabi-gcc-ar b/bin/arm-linux-androideabi-gcc-ar index ccd0a30..52290a1 100755 Binary files a/bin/arm-linux-androideabi-gcc-ar and b/bin/arm-linux-androideabi-gcc-ar differ diff --git a/bin/arm-linux-androideabi-gcc-nm b/bin/arm-linux-androideabi-gcc-nm index cce34b6..a2423e2 100755 Binary files a/bin/arm-linux-androideabi-gcc-nm and b/bin/arm-linux-androideabi-gcc-nm differ diff --git a/bin/arm-linux-androideabi-gcc-ranlib b/bin/arm-linux-androideabi-gcc-ranlib index 6e75684..126687e 100755 Binary files a/bin/arm-linux-androideabi-gcc-ranlib and b/bin/arm-linux-androideabi-gcc-ranlib differ diff --git a/bin/arm-linux-androideabi-gprof b/bin/arm-linux-androideabi-gprof index 90d5235..4b08132 100755 Binary files a/bin/arm-linux-androideabi-gprof and b/bin/arm-linux-androideabi-gprof differ diff --git a/bin/arm-linux-androideabi-ld.bfd b/bin/arm-linux-androideabi-ld.bfd index 5e6dc55..bfea842 100755 Binary files a/bin/arm-linux-androideabi-ld.bfd and b/bin/arm-linux-androideabi-ld.bfd differ diff --git a/bin/arm-linux-androideabi-ld.gold b/bin/arm-linux-androideabi-ld.gold index 97cd92f..f123c82 100755 Binary files a/bin/arm-linux-androideabi-ld.gold and b/bin/arm-linux-androideabi-ld.gold differ diff --git a/bin/arm-linux-androideabi-nm b/bin/arm-linux-androideabi-nm index 362d1e5..65fd659 100755 Binary files a/bin/arm-linux-androideabi-nm and b/bin/arm-linux-androideabi-nm differ diff --git a/bin/arm-linux-androideabi-objcopy b/bin/arm-linux-androideabi-objcopy index 0a69a07..664c2e1 100755 Binary files a/bin/arm-linux-androideabi-objcopy and b/bin/arm-linux-androideabi-objcopy differ diff --git a/bin/arm-linux-androideabi-objdump b/bin/arm-linux-androideabi-objdump index f77a0bc..03d1399 100755 Binary files a/bin/arm-linux-androideabi-objdump and b/bin/arm-linux-androideabi-objdump differ diff --git a/bin/arm-linux-androideabi-ranlib b/bin/arm-linux-androideabi-ranlib index c7614da..34899ec 100755 Binary files a/bin/arm-linux-androideabi-ranlib and b/bin/arm-linux-androideabi-ranlib differ diff --git a/bin/arm-linux-androideabi-readelf b/bin/arm-linux-androideabi-readelf index 2243772..f252779 100755 Binary files a/bin/arm-linux-androideabi-readelf and b/bin/arm-linux-androideabi-readelf differ diff --git a/bin/arm-linux-androideabi-size b/bin/arm-linux-androideabi-size index 2bfe06d..4b1729e 100755 Binary files a/bin/arm-linux-androideabi-size and b/bin/arm-linux-androideabi-size differ diff --git a/bin/arm-linux-androideabi-strings b/bin/arm-linux-androideabi-strings index af2f791..0284310 100755 Binary files a/bin/arm-linux-androideabi-strings and b/bin/arm-linux-androideabi-strings differ diff --git a/bin/arm-linux-androideabi-strip b/bin/arm-linux-androideabi-strip index 46b7536..bc368b6 100755 Binary files a/bin/arm-linux-androideabi-strip and b/bin/arm-linux-androideabi-strip differ diff --git a/bin/real-arm-linux-androideabi-g++ b/bin/real-arm-linux-androideabi-g++ index 4654f28..ea04efa 100755 Binary files a/bin/real-arm-linux-androideabi-g++ and b/bin/real-arm-linux-androideabi-g++ differ diff --git a/bin/real-arm-linux-androideabi-gcc b/bin/real-arm-linux-androideabi-gcc index 85a948f..ce8ed42 100755 Binary files a/bin/real-arm-linux-androideabi-gcc and b/bin/real-arm-linux-androideabi-gcc differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/crtbegin.o b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/crtbegin.o index 7ed0f3a..8c1fff3 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/crtbegin.o and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/crtbegin.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/crtbeginS.o b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/crtbeginS.o index 8c250e9..a9248c0 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/crtbeginS.o and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/crtbeginS.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/crtbeginT.o b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/crtbeginT.o index 7ed0f3a..8c1fff3 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/crtbeginT.o and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/crtbeginT.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/crtend.o b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/crtend.o index c178c92..2000960 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/crtend.o and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/crtend.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/crtendS.o b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/crtendS.o index c178c92..2000960 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/crtendS.o and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/crtendS.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/crtbegin.o b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/crtbegin.o index 34effe1..7d087eb 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/crtbegin.o and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/crtbegin.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/crtbeginS.o b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/crtbeginS.o index 5274a6b..027f2d4 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/crtbeginS.o and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/crtbeginS.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/crtbeginT.o b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/crtbeginT.o index 34effe1..7d087eb 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/crtbeginT.o and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/crtbeginT.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/crtend.o b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/crtend.o index 592ec50..5ad4d0a 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/crtend.o and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/crtend.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/crtendS.o b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/crtendS.o index 592ec50..5ad4d0a 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/crtendS.o and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/crtendS.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/libgcc.a b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/libgcc.a index 5c32f5f..25c3c5f 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/libgcc.a and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/libgcc.a differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/libgcov.a b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/libgcov.a index 4a400e9..486308d 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/libgcov.a and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/hard/libgcov.a differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/libgcc.a b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/libgcc.a index f501181..7f3725c 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/libgcc.a and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/libgcc.a differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/libgcov.a b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/libgcov.a index 839d0ae..0001b85 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/libgcov.a and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/libgcov.a differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/crtbegin.o b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/crtbegin.o index 25f1a3f..f21e16c 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/crtbegin.o and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/crtbegin.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/crtbeginS.o b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/crtbeginS.o index 8e42f7c..b1db2d9 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/crtbeginS.o and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/crtbeginS.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/crtbeginT.o b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/crtbeginT.o index 25f1a3f..f21e16c 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/crtbeginT.o and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/crtbeginT.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/crtend.o b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/crtend.o index e527a7b..5b5b600 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/crtend.o and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/crtend.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/crtendS.o b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/crtendS.o index e527a7b..5b5b600 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/crtendS.o and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/crtendS.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/crtbegin.o b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/crtbegin.o index 2dafeaa..427d2ca 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/crtbegin.o and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/crtbegin.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/crtbeginS.o b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/crtbeginS.o index 6661d7e..f331f28 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/crtbeginS.o and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/crtbeginS.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/crtbeginT.o b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/crtbeginT.o index 2dafeaa..427d2ca 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/crtbeginT.o and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/crtbeginT.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/crtend.o b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/crtend.o index a979e13..f4da596 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/crtend.o and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/crtend.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/crtendS.o b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/crtendS.o index a979e13..f4da596 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/crtendS.o and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/crtendS.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/libgcc.a b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/libgcc.a index c82babd..719de15 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/libgcc.a and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/libgcc.a differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/libgcov.a b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/libgcov.a index 2df7381..105c54f 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/libgcov.a and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/hard/libgcov.a differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/libgcc.a b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/libgcc.a index d663e15..998191b 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/libgcc.a and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/libgcc.a differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/libgcov.a b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/libgcov.a index 82d4c3b..e97d6be 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/libgcov.a and b/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/libgcov.a differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/crtbegin.o b/lib/gcc/arm-linux-androideabi/4.9.x/crtbegin.o index 9a0dbf3..b3f4622 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/crtbegin.o and b/lib/gcc/arm-linux-androideabi/4.9.x/crtbegin.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/crtbeginS.o b/lib/gcc/arm-linux-androideabi/4.9.x/crtbeginS.o index e5e40be..0c0715f 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/crtbeginS.o and b/lib/gcc/arm-linux-androideabi/4.9.x/crtbeginS.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/crtbeginT.o b/lib/gcc/arm-linux-androideabi/4.9.x/crtbeginT.o index 9a0dbf3..b3f4622 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/crtbeginT.o and b/lib/gcc/arm-linux-androideabi/4.9.x/crtbeginT.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/crtend.o b/lib/gcc/arm-linux-androideabi/4.9.x/crtend.o index beb83c4..57b52b3 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/crtend.o and b/lib/gcc/arm-linux-androideabi/4.9.x/crtend.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/crtendS.o b/lib/gcc/arm-linux-androideabi/4.9.x/crtendS.o index beb83c4..57b52b3 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/crtendS.o and b/lib/gcc/arm-linux-androideabi/4.9.x/crtendS.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/include-fixed/linux/a.out.h b/lib/gcc/arm-linux-androideabi/4.9.x/include-fixed/linux/a.out.h index 72f2bf1..2129bca 100644 --- a/lib/gcc/arm-linux-androideabi/4.9.x/include-fixed/linux/a.out.h +++ b/lib/gcc/arm-linux-androideabi/4.9.x/include-fixed/linux/a.out.h @@ -2,7 +2,7 @@ It has been auto-edited by fixincludes from: - "/tmp/35e600aefabe85f7f85608310ddf0c46/sysroot/usr/include/linux/a.out.h" + "/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/sysroot/usr/include/linux/a.out.h" This had to be done to correct non-standard usages in the original, manufacturer supplied header file. */ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/libgcc.a b/lib/gcc/arm-linux-androideabi/4.9.x/libgcc.a index c5fbebe..430700c 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/libgcc.a and b/lib/gcc/arm-linux-androideabi/4.9.x/libgcc.a differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/libgcov.a b/lib/gcc/arm-linux-androideabi/4.9.x/libgcov.a index 87a1ce2..716a767 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/libgcov.a and b/lib/gcc/arm-linux-androideabi/4.9.x/libgcov.a differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtbegin.o b/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtbegin.o index 97ff387..79ada18 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtbegin.o and b/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtbegin.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtbeginS.o b/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtbeginS.o index 906ad2f..f7cd7f9 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtbeginS.o and b/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtbeginS.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtbeginT.o b/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtbeginT.o index 97ff387..79ada18 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtbeginT.o and b/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtbeginT.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtend.o b/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtend.o index ba3efc1..e5bd164 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtend.o and b/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtend.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtendS.o b/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtendS.o index ba3efc1..e5bd164 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtendS.o and b/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtendS.o differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/thumb/libgcc.a b/lib/gcc/arm-linux-androideabi/4.9.x/thumb/libgcc.a index 6ced8b6..4d30e09 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/thumb/libgcc.a and b/lib/gcc/arm-linux-androideabi/4.9.x/thumb/libgcc.a differ diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/thumb/libgcov.a b/lib/gcc/arm-linux-androideabi/4.9.x/thumb/libgcov.a index 00d6983..1dcf9ee 100644 Binary files a/lib/gcc/arm-linux-androideabi/4.9.x/thumb/libgcov.a and b/lib/gcc/arm-linux-androideabi/4.9.x/thumb/libgcov.a differ diff --git a/libexec/gcc/arm-linux-androideabi/4.9.x/cc1 b/libexec/gcc/arm-linux-androideabi/4.9.x/cc1 index d63dce8..54386e3 100755 Binary files a/libexec/gcc/arm-linux-androideabi/4.9.x/cc1 and b/libexec/gcc/arm-linux-androideabi/4.9.x/cc1 differ diff --git a/libexec/gcc/arm-linux-androideabi/4.9.x/cc1plus b/libexec/gcc/arm-linux-androideabi/4.9.x/cc1plus index 97dc769..43c8488 100755 Binary files a/libexec/gcc/arm-linux-androideabi/4.9.x/cc1plus and b/libexec/gcc/arm-linux-androideabi/4.9.x/cc1plus differ diff --git a/libexec/gcc/arm-linux-androideabi/4.9.x/collect2 b/libexec/gcc/arm-linux-androideabi/4.9.x/collect2 index 5f5c98b..c5ecb44 100755 Binary files a/libexec/gcc/arm-linux-androideabi/4.9.x/collect2 and b/libexec/gcc/arm-linux-androideabi/4.9.x/collect2 differ diff --git a/libexec/gcc/arm-linux-androideabi/4.9.x/lto1 b/libexec/gcc/arm-linux-androideabi/4.9.x/lto1 index 1ea13f9..80ad862 100755 Binary files a/libexec/gcc/arm-linux-androideabi/4.9.x/lto1 and b/libexec/gcc/arm-linux-androideabi/4.9.x/lto1 differ diff --git a/repo.prop b/repo.prop index aa39c98..8933f14 100644 --- a/repo.prop +++ b/repo.prop @@ -1,14 +1,14 @@ platform/manifest 29325e7007f581fc689a14b68b0feb04f52e3d0f -platform/ndk f2a36f4b1fa1af8774d7e15862852c9c45c9ea30 +platform/ndk 0ae07f7ed915ad7fef6fc41178da2e656d808f14 platform/prebuilts/gcc/darwin-x86/host/headers 4ac4f7cc41cf3c9e36fc3d6cf37fd1cfa9587a68 platform/prebuilts/gcc/darwin-x86/host/i686-apple-darwin-4.2.1 ec5aa66aaa4964c27564d0ec84dc1f18a2d72b7e -platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8 ed4f6b503e1d7f2bc03d87b90084e12e33f8be4f -platform/prebuilts/ndk c82d6ec52ce9c2cc3bfc5fcba451935689de921e -toolchain/binutils f3d35cf659b876b829bbc7cdb6f8e14ece5b1b37 +platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8 a461e1b3161b4817b743ddbfb58a3878e7985c8b +platform/prebuilts/ndk 96af87d0700b013ff9e15fdc1d661e0723d74e33 +toolchain/binutils 53dd00a1a34ebf5251f6210d778768b4157c5e11 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 toolchain/expat 40172a0ae9d40a068f1e1a48ffcf6a1ccf765ed5 -toolchain/gcc fe948798823b679925aed6b60efec51b9af7dd09 +toolchain/gcc cde5cc9ca5dc2c4e3be26080e84e3deda7bd4aa4 toolchain/gmp b2acd5dbf47868ac5b5bc844e16d2cadcbd4c810 toolchain/isl 0ccf95726af8ce58ad61ff474addbce3a31ba99c toolchain/mpc 835d16e92eed875638a8b5d552034c3b1aae045b -- cgit v1.2.3