2 * Copyright (C) 2012 Regents of the University of California
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation, version 2.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
20 .hash : { *(.hash) } :text
21 .gnu.hash : { *(.gnu.hash) }
22 .dynsym : { *(.dynsym) }
23 .dynstr : { *(.dynstr) }
24 .gnu.version : { *(.gnu.version) }
25 .gnu.version_d : { *(.gnu.version_d) }
26 .gnu.version_r : { *(.gnu.version_r) }
28 .note : { *(.note.*) } :text :note
29 .dynamic : { *(.dynamic) } :text :dynamic
31 .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
32 .eh_frame : { KEEP (*(.eh_frame)) } :text
34 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
37 * This linker script is used both with -r and with -shared.
38 * For the layouts to match, we need to skip more than enough
39 * space for the dynamic symbol table, etc. If this amount is
40 * insufficient, ld -shared will error; simply increase it here.
43 .text : { *(.text .text.*) } :text
47 *(.data .data.* .gnu.linkonce.d.*)
49 *(.bss .bss.* .gnu.linkonce.b.*)
54 * We must supply the ELF program headers explicitly to get just one
55 * PT_LOAD segment, and set the flags explicitly to make segments read-only.
59 text PT_LOAD FLAGS(5) FILEHDR PHDRS; /* PF_R|PF_X */
60 dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
61 note PT_NOTE FLAGS(4); /* PF_R */
62 eh_frame_hdr PT_GNU_EH_FRAME;
66 * This controls what symbols we export from the DSO.