diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-09-29 08:55:07 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-09-29 08:55:07 +0000 |
commit | 8d2ac3fbfa251cd8d1a38357c3395b9bbd198860 (patch) | |
tree | 70847124125a20c940146ddba2bbdd6385a37dd6 | |
parent | ff98796d7a8b1b0331201a5de28f304bdb8f8041 (diff) | |
parent | d7cab3085b236384950424cedc49c5bb3d53f733 (diff) | |
download | arm-linux-androideabi-4.9-8d2ac3fbfa251cd8d1a38357c3395b9bbd198860.tar.gz |
release-request-fbd98711-169e-4972-a5f2-db043df00e09-for-git_pi-release-4367572 snap-temp-L13500000107248413
Change-Id: Ie39c6a9d2af85b05c69beb4cdcc37f799adbb5c5
111 files changed, 677 insertions, 742 deletions
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 Binary files differindex 8572769..51e2698 100644 --- a/arm-linux-androideabi/lib/armv7-a/hard/libatomic.a +++ b/arm-linux-androideabi/lib/armv7-a/hard/libatomic.a diff --git a/arm-linux-androideabi/lib/armv7-a/hard/libgomp.a b/arm-linux-androideabi/lib/armv7-a/hard/libgomp.a Binary files differindex 13c4532..3558e72 100644 --- a/arm-linux-androideabi/lib/armv7-a/hard/libgomp.a +++ b/arm-linux-androideabi/lib/armv7-a/hard/libgomp.a diff --git a/arm-linux-androideabi/lib/armv7-a/libatomic.a b/arm-linux-androideabi/lib/armv7-a/libatomic.a Binary files differindex fe07d2f..35a15a5 100644 --- a/arm-linux-androideabi/lib/armv7-a/libatomic.a +++ b/arm-linux-androideabi/lib/armv7-a/libatomic.a diff --git a/arm-linux-androideabi/lib/armv7-a/libgomp.a b/arm-linux-androideabi/lib/armv7-a/libgomp.a Binary files differindex cb9d471..ec2a6d4 100644 --- a/arm-linux-androideabi/lib/armv7-a/libgomp.a +++ b/arm-linux-androideabi/lib/armv7-a/libgomp.a diff --git a/arm-linux-androideabi/lib/armv7-a/thumb/hard/libatomic.a b/arm-linux-androideabi/lib/armv7-a/thumb/hard/libatomic.a Binary files differindex 5c1d835..a9b3152 100644 --- a/arm-linux-androideabi/lib/armv7-a/thumb/hard/libatomic.a +++ b/arm-linux-androideabi/lib/armv7-a/thumb/hard/libatomic.a diff --git a/arm-linux-androideabi/lib/armv7-a/thumb/hard/libgomp.a b/arm-linux-androideabi/lib/armv7-a/thumb/hard/libgomp.a Binary files differindex ded4e88..da84efa 100644 --- a/arm-linux-androideabi/lib/armv7-a/thumb/hard/libgomp.a +++ b/arm-linux-androideabi/lib/armv7-a/thumb/hard/libgomp.a diff --git a/arm-linux-androideabi/lib/armv7-a/thumb/libatomic.a b/arm-linux-androideabi/lib/armv7-a/thumb/libatomic.a Binary files differindex df39d65..eb02c11 100644 --- a/arm-linux-androideabi/lib/armv7-a/thumb/libatomic.a +++ b/arm-linux-androideabi/lib/armv7-a/thumb/libatomic.a diff --git a/arm-linux-androideabi/lib/armv7-a/thumb/libgomp.a b/arm-linux-androideabi/lib/armv7-a/thumb/libgomp.a Binary files differindex 50c5745..40ff591 100644 --- a/arm-linux-androideabi/lib/armv7-a/thumb/libgomp.a +++ b/arm-linux-androideabi/lib/armv7-a/thumb/libgomp.a 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 Binary files differindex e63f43b..0a1baa0 100644 --- a/arm-linux-androideabi/lib/libatomic.a +++ b/arm-linux-androideabi/lib/libatomic.a diff --git a/arm-linux-androideabi/lib/libgomp.a b/arm-linux-androideabi/lib/libgomp.a Binary files differindex 0b0dce6..6171839 100644 --- a/arm-linux-androideabi/lib/libgomp.a +++ b/arm-linux-androideabi/lib/libgomp.a diff --git a/arm-linux-androideabi/lib/thumb/libatomic.a b/arm-linux-androideabi/lib/thumb/libatomic.a Binary files differindex 3ec585e..4d10dab 100644 --- a/arm-linux-androideabi/lib/thumb/libatomic.a +++ b/arm-linux-androideabi/lib/thumb/libatomic.a diff --git a/arm-linux-androideabi/lib/thumb/libgomp.a b/arm-linux-androideabi/lib/thumb/libgomp.a Binary files differindex 3294d14..77ce381 100644 --- a/arm-linux-androideabi/lib/thumb/libgomp.a +++ b/arm-linux-androideabi/lib/thumb/libgomp.a diff --git a/bin/arm-linux-androideabi-addr2line b/bin/arm-linux-androideabi-addr2line Binary files differindex fb3ca6f..960cd6e 100755 --- a/bin/arm-linux-androideabi-addr2line +++ b/bin/arm-linux-androideabi-addr2line diff --git a/bin/arm-linux-androideabi-ar b/bin/arm-linux-androideabi-ar Binary files differindex d07129b..33a3e60 100755 --- a/bin/arm-linux-androideabi-ar +++ b/bin/arm-linux-androideabi-ar diff --git a/bin/arm-linux-androideabi-as b/bin/arm-linux-androideabi-as Binary files differindex 6d8eeee..cece221 100755 --- a/bin/arm-linux-androideabi-as +++ b/bin/arm-linux-androideabi-as diff --git a/bin/arm-linux-androideabi-c++filt b/bin/arm-linux-androideabi-c++filt Binary files differindex dcf040d..f0f118a 100755 --- a/bin/arm-linux-androideabi-c++filt +++ b/bin/arm-linux-androideabi-c++filt diff --git a/bin/arm-linux-androideabi-cpp b/bin/arm-linux-androideabi-cpp Binary files differindex 95fe92a..c11bbf4 100755 --- a/bin/arm-linux-androideabi-cpp +++ b/bin/arm-linux-androideabi-cpp diff --git a/bin/arm-linux-androideabi-dwp b/bin/arm-linux-androideabi-dwp Binary files differindex dc3fe3f..36d4a1c 100755 --- a/bin/arm-linux-androideabi-dwp +++ b/bin/arm-linux-androideabi-dwp diff --git a/bin/arm-linux-androideabi-elfedit b/bin/arm-linux-androideabi-elfedit Binary files differindex 63bbfff..83da4a1 100755 --- a/bin/arm-linux-androideabi-elfedit +++ b/bin/arm-linux-androideabi-elfedit diff --git a/bin/arm-linux-androideabi-gcc-4.9.x b/bin/arm-linux-androideabi-gcc-4.9.x Binary files differindex 85a948f..ce8ed42 100755 --- a/bin/arm-linux-androideabi-gcc-4.9.x +++ b/bin/arm-linux-androideabi-gcc-4.9.x diff --git a/bin/arm-linux-androideabi-gcc-ar b/bin/arm-linux-androideabi-gcc-ar Binary files differindex ccd0a30..52290a1 100755 --- a/bin/arm-linux-androideabi-gcc-ar +++ b/bin/arm-linux-androideabi-gcc-ar diff --git a/bin/arm-linux-androideabi-gcc-nm b/bin/arm-linux-androideabi-gcc-nm Binary files differindex cce34b6..a2423e2 100755 --- a/bin/arm-linux-androideabi-gcc-nm +++ b/bin/arm-linux-androideabi-gcc-nm diff --git a/bin/arm-linux-androideabi-gcc-ranlib b/bin/arm-linux-androideabi-gcc-ranlib Binary files differindex 6e75684..126687e 100755 --- a/bin/arm-linux-androideabi-gcc-ranlib +++ b/bin/arm-linux-androideabi-gcc-ranlib diff --git a/bin/arm-linux-androideabi-gprof b/bin/arm-linux-androideabi-gprof Binary files differindex 90d5235..4b08132 100755 --- a/bin/arm-linux-androideabi-gprof +++ b/bin/arm-linux-androideabi-gprof diff --git a/bin/arm-linux-androideabi-ld.bfd b/bin/arm-linux-androideabi-ld.bfd Binary files differindex 5e6dc55..bfea842 100755 --- a/bin/arm-linux-androideabi-ld.bfd +++ b/bin/arm-linux-androideabi-ld.bfd diff --git a/bin/arm-linux-androideabi-ld.gold b/bin/arm-linux-androideabi-ld.gold Binary files differindex 97cd92f..f123c82 100755 --- a/bin/arm-linux-androideabi-ld.gold +++ b/bin/arm-linux-androideabi-ld.gold diff --git a/bin/arm-linux-androideabi-nm b/bin/arm-linux-androideabi-nm Binary files differindex 362d1e5..65fd659 100755 --- a/bin/arm-linux-androideabi-nm +++ b/bin/arm-linux-androideabi-nm diff --git a/bin/arm-linux-androideabi-objcopy b/bin/arm-linux-androideabi-objcopy Binary files differindex 0a69a07..664c2e1 100755 --- a/bin/arm-linux-androideabi-objcopy +++ b/bin/arm-linux-androideabi-objcopy diff --git a/bin/arm-linux-androideabi-objdump b/bin/arm-linux-androideabi-objdump Binary files differindex f77a0bc..03d1399 100755 --- a/bin/arm-linux-androideabi-objdump +++ b/bin/arm-linux-androideabi-objdump diff --git a/bin/arm-linux-androideabi-ranlib b/bin/arm-linux-androideabi-ranlib Binary files differindex c7614da..34899ec 100755 --- a/bin/arm-linux-androideabi-ranlib +++ b/bin/arm-linux-androideabi-ranlib diff --git a/bin/arm-linux-androideabi-readelf b/bin/arm-linux-androideabi-readelf Binary files differindex 2243772..f252779 100755 --- a/bin/arm-linux-androideabi-readelf +++ b/bin/arm-linux-androideabi-readelf diff --git a/bin/arm-linux-androideabi-size b/bin/arm-linux-androideabi-size Binary files differindex 2bfe06d..4b1729e 100755 --- a/bin/arm-linux-androideabi-size +++ b/bin/arm-linux-androideabi-size diff --git a/bin/arm-linux-androideabi-strings b/bin/arm-linux-androideabi-strings Binary files differindex af2f791..0284310 100755 --- a/bin/arm-linux-androideabi-strings +++ b/bin/arm-linux-androideabi-strings diff --git a/bin/arm-linux-androideabi-strip b/bin/arm-linux-androideabi-strip Binary files differindex 46b7536..bc368b6 100755 --- a/bin/arm-linux-androideabi-strip +++ b/bin/arm-linux-androideabi-strip diff --git a/bin/real-arm-linux-androideabi-g++ b/bin/real-arm-linux-androideabi-g++ Binary files differindex 4654f28..ea04efa 100755 --- a/bin/real-arm-linux-androideabi-g++ +++ b/bin/real-arm-linux-androideabi-g++ diff --git a/bin/real-arm-linux-androideabi-gcc b/bin/real-arm-linux-androideabi-gcc Binary files differindex 85a948f..ce8ed42 100755 --- a/bin/real-arm-linux-androideabi-gcc +++ b/bin/real-arm-linux-androideabi-gcc 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 Binary files differindex 7ed0f3a..8c1fff3 100644 --- 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 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 Binary files differindex 8c250e9..a9248c0 100644 --- 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 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 Binary files differindex 7ed0f3a..8c1fff3 100644 --- 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 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 Binary files differindex c178c92..2000960 100644 --- 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 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 Binary files differindex c178c92..2000960 100644 --- 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 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 Binary files differindex 34effe1..7d087eb 100644 --- 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 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 Binary files differindex 5274a6b..027f2d4 100644 --- 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 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 Binary files differindex 34effe1..7d087eb 100644 --- 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 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 Binary files differindex 592ec50..5ad4d0a 100644 --- 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 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 Binary files differindex 592ec50..5ad4d0a 100644 --- 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 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 Binary files differindex 5c32f5f..25c3c5f 100644 --- 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 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 Binary files differindex 4a400e9..486308d 100644 --- 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 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 Binary files differindex f501181..7f3725c 100644 --- 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 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 Binary files differindex 839d0ae..0001b85 100644 --- 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 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 Binary files differindex 25f1a3f..f21e16c 100644 --- 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 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 Binary files differindex 8e42f7c..b1db2d9 100644 --- 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 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 Binary files differindex 25f1a3f..f21e16c 100644 --- 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 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 Binary files differindex e527a7b..5b5b600 100644 --- 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 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 Binary files differindex e527a7b..5b5b600 100644 --- 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 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 Binary files differindex 2dafeaa..427d2ca 100644 --- 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 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 Binary files differindex 6661d7e..f331f28 100644 --- 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 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 Binary files differindex 2dafeaa..427d2ca 100644 --- 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 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 Binary files differindex a979e13..f4da596 100644 --- 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 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 Binary files differindex a979e13..f4da596 100644 --- 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 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 Binary files differindex c82babd..719de15 100644 --- 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 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 Binary files differindex 2df7381..105c54f 100644 --- 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 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 Binary files differindex d663e15..998191b 100644 --- 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 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 Binary files differindex 82d4c3b..e97d6be 100644 --- 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 diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/crtbegin.o b/lib/gcc/arm-linux-androideabi/4.9.x/crtbegin.o Binary files differindex 9a0dbf3..b3f4622 100644 --- a/lib/gcc/arm-linux-androideabi/4.9.x/crtbegin.o +++ b/lib/gcc/arm-linux-androideabi/4.9.x/crtbegin.o diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/crtbeginS.o b/lib/gcc/arm-linux-androideabi/4.9.x/crtbeginS.o Binary files differindex e5e40be..0c0715f 100644 --- a/lib/gcc/arm-linux-androideabi/4.9.x/crtbeginS.o +++ b/lib/gcc/arm-linux-androideabi/4.9.x/crtbeginS.o diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/crtbeginT.o b/lib/gcc/arm-linux-androideabi/4.9.x/crtbeginT.o Binary files differindex 9a0dbf3..b3f4622 100644 --- a/lib/gcc/arm-linux-androideabi/4.9.x/crtbeginT.o +++ b/lib/gcc/arm-linux-androideabi/4.9.x/crtbeginT.o diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/crtend.o b/lib/gcc/arm-linux-androideabi/4.9.x/crtend.o Binary files differindex beb83c4..57b52b3 100644 --- a/lib/gcc/arm-linux-androideabi/4.9.x/crtend.o +++ b/lib/gcc/arm-linux-androideabi/4.9.x/crtend.o diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/crtendS.o b/lib/gcc/arm-linux-androideabi/4.9.x/crtendS.o Binary files differindex beb83c4..57b52b3 100644 --- a/lib/gcc/arm-linux-androideabi/4.9.x/crtendS.o +++ b/lib/gcc/arm-linux-androideabi/4.9.x/crtendS.o 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 Binary files differindex c5fbebe..430700c 100644 --- a/lib/gcc/arm-linux-androideabi/4.9.x/libgcc.a +++ b/lib/gcc/arm-linux-androideabi/4.9.x/libgcc.a diff --git a/lib/gcc/arm-linux-androideabi/4.9.x/libgcov.a b/lib/gcc/arm-linux-androideabi/4.9.x/libgcov.a Binary files differindex 87a1ce2..716a767 100644 --- a/lib/gcc/arm-linux-androideabi/4.9.x/libgcov.a +++ b/lib/gcc/arm-linux-androideabi/4.9.x/libgcov.a 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 Binary files differindex 97ff387..79ada18 100644 --- a/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtbegin.o +++ b/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtbegin.o 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 Binary files differindex 906ad2f..f7cd7f9 100644 --- a/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtbeginS.o +++ b/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtbeginS.o 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 Binary files differindex 97ff387..79ada18 100644 --- a/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtbeginT.o +++ b/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtbeginT.o 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 Binary files differindex ba3efc1..e5bd164 100644 --- a/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtend.o +++ b/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtend.o 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 Binary files differindex ba3efc1..e5bd164 100644 --- a/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtendS.o +++ b/lib/gcc/arm-linux-androideabi/4.9.x/thumb/crtendS.o 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 Binary files differindex 6ced8b6..4d30e09 100644 --- a/lib/gcc/arm-linux-androideabi/4.9.x/thumb/libgcc.a +++ b/lib/gcc/arm-linux-androideabi/4.9.x/thumb/libgcc.a 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 Binary files differindex 00d6983..1dcf9ee 100644 --- a/lib/gcc/arm-linux-androideabi/4.9.x/thumb/libgcov.a +++ b/lib/gcc/arm-linux-androideabi/4.9.x/thumb/libgcov.a diff --git a/libexec/gcc/arm-linux-androideabi/4.9.x/cc1 b/libexec/gcc/arm-linux-androideabi/4.9.x/cc1 Binary files differindex d63dce8..54386e3 100755 --- a/libexec/gcc/arm-linux-androideabi/4.9.x/cc1 +++ b/libexec/gcc/arm-linux-androideabi/4.9.x/cc1 diff --git a/libexec/gcc/arm-linux-androideabi/4.9.x/cc1plus b/libexec/gcc/arm-linux-androideabi/4.9.x/cc1plus Binary files differindex 97dc769..43c8488 100755 --- a/libexec/gcc/arm-linux-androideabi/4.9.x/cc1plus +++ b/libexec/gcc/arm-linux-androideabi/4.9.x/cc1plus diff --git a/libexec/gcc/arm-linux-androideabi/4.9.x/collect2 b/libexec/gcc/arm-linux-androideabi/4.9.x/collect2 Binary files differindex 5f5c98b..c5ecb44 100755 --- a/libexec/gcc/arm-linux-androideabi/4.9.x/collect2 +++ b/libexec/gcc/arm-linux-androideabi/4.9.x/collect2 diff --git a/libexec/gcc/arm-linux-androideabi/4.9.x/lto1 b/libexec/gcc/arm-linux-androideabi/4.9.x/lto1 Binary files differindex 1ea13f9..80ad862 100755 --- a/libexec/gcc/arm-linux-androideabi/4.9.x/lto1 +++ b/libexec/gcc/arm-linux-androideabi/4.9.x/lto1 @@ -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 |