2 # AIX always uses shared libraries. The section VMA appears to be
3 # unimportant. The native linker aligns the sections on boundaries
4 # specified by the -H option.
6 # Copyright (C) 2014-2023 Free Software Foundation, Inc.
8 # Copying and distribution of this file, with or without modification,
9 # are permitted in any medium without royalty provided the copyright
10 # notice and this notice are preserved.
13 /* Copyright (C) 2014-2023 Free Software Foundation, Inc.
15 Copying and distribution of this script, with or without modification,
16 are permitted in any medium without royalty provided the copyright
17 notice and this notice are preserved. */
20 ${RELOCATING+${LIB_SEARCH_DIRS}}
21 ${RELOCATING+ENTRY (__start)}
26 . = ALIGN (0x10000000 + SIZEOF_HEADERS, 32);
27 .text ${RELOCATING-0} : {
28 ${RELOCATING+PROVIDE (_text = .);}
37 ${RELOCATING+PROVIDE (_etext = .);}
40 /* .tdata and .tbss addresses are representing the offset from
41 the TLS pointer. It starts at -0x7800 for 64bit and -0x7c00
43 TODO: 32bit should have -0x7c00 but it works like this for
45 The other particularity is that they must be before .data
46 sections. But .data must be aligned correctly as if the
47 addresses were contiguous. This means that the correct
48 address must be restored, taking into account: the size of
49 .text, its alignment 2^5, the size of .tdata and its
61 . = ${RELOCATING+(ALIGN (0x10000000 + SIZEOF_HEADERS, 32)) + }SIZEOF(.text);
63 . = . + SIZEOF(.tdata);
66 /* .data starting address must be in a different segment than
67 the .text addresses. Thus, 0x10000000 is added. */
68 . = ALIGN (0x10000000) + (. & 0xfff);
70 ${RELOCATING+PROVIDE (_data = .);}
78 ${CONSTRUCTING+CONSTRUCTORS}
84 ${RELOCATING+PROVIDE (_edata = .);}
92 ${RELOCATING+PROVIDE (_end = .);}
93 ${RELOCATING+PROVIDE (end = .);}