summaryrefslogtreecommitdiff
path: root/x86_64-linux-android/lib/ldscripts/elf32_x86_64.xn
diff options
context:
space:
mode:
authorRahul Chaudhry <rahulchaudhry@google.com>2017-09-18 10:32:12 -0700
committerRahul Chaudhry <rahulchaudhry@google.com>2017-09-19 10:32:50 -0700
commitcb32df02ca49be4d2de4d05c1e46032abd30efc6 (patch)
tree16684b1a438c31338e0f3aa9b68bd98fefe5c16e /x86_64-linux-android/lib/ldscripts/elf32_x86_64.xn
parent9b83502b78b50217b04e66b34a3e017683093cb3 (diff)
downloadx86_64-linux-android-4.9-cb32df02ca49be4d2de4d05c1e46032abd30efc6.tar.gz
Update prebuilt GCC to build 4342532.
This build contains binutils-2_27: - https://android-review.googlesource.com/c/toolchain/binutils/+/474197 It also contains many other (smaller) changes since the last time prebuilts were updated on 2017-07-11 (build 4168537). Bug: 37683243 Test: 'lunch aosp_x86-eng; m' completed successfully on darwin host. Test: 'lunch aosp_x86_64-eng; m' completed successfully on darwin host. Change-Id: Iccafdba67e7f9e1dff6340bdf05ba14e1c71e27b
Diffstat (limited to 'x86_64-linux-android/lib/ldscripts/elf32_x86_64.xn')
-rw-r--r--x86_64-linux-android/lib/ldscripts/elf32_x86_64.xn63
1 files changed, 30 insertions, 33 deletions
diff --git a/x86_64-linux-android/lib/ldscripts/elf32_x86_64.xn b/x86_64-linux-android/lib/ldscripts/elf32_x86_64.xn
index 3e440fa..0abd2fe 100644
--- a/x86_64-linux-android/lib/ldscripts/elf32_x86_64.xn
+++ b/x86_64-linux-android/lib/ldscripts/elf32_x86_64.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-x86-64", "elf32-x86-64",
"elf32-x86-64")
OUTPUT_ARCH(i386:x64-32)
ENTRY(_start)
+SEARCH_DIR("=/tmp/0efb08cea2bfaf7e8b2dd2d612423fe3/x86_64-linux-android/libx32"); SEARCH_DIR("=/usr/local/libx32"); SEARCH_DIR("=/libx32"); SEARCH_DIR("=/usr/libx32"); SEARCH_DIR("=/tmp/0efb08cea2bfaf7e8b2dd2d612423fe3/x86_64-linux-android/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib");
SECTIONS
{
/* Read-only sections, merged into text segment: */
- PROVIDE (__executable_start = 0x400000); . = 0x400000 + SIZEOF_HEADERS;
+ PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x400000)); . = SEGMENT_START("text-segment", 0x400000) + SIZEOF_HEADERS;
.interp : { *(.interp) }
.note.gnu.build-id : { *(.note.gnu.build-id) }
.hash : { *(.hash) }
@@ -67,50 +68,45 @@ SECTIONS
PROVIDE (etext = .);
.rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
.rodata1 : { *(.rodata1) }
- .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
@@ -123,20 +119,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))
}
@@ -161,8 +157,10 @@ 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);
}
.lbss :
{
@@ -182,9 +180,7 @@ SECTIONS
. = ALIGN(. != 0 ? 32 / 8 : 1);
}
. = ALIGN(32 / 8);
- _end = .;
- _bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
- PROVIDE (end = .);
+ _end = .; PROVIDE (end = .);
. = DATA_SEGMENT_END (.);
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
@@ -224,6 +220,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)) }
- /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.mdebug.*) }
+ /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
}