-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcc-linker-script
More file actions
executable file
·26 lines (22 loc) · 898 Bytes
/
cc-linker-script
File metadata and controls
executable file
·26 lines (22 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh
# Dump compiler toolchain default linker script
#
# $ cc-linker-script
# OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64",
# "elf64-x86-64")
# OUTPUT_ARCH(i386:x86-64)
# ENTRY(_start)
# SEARCH_DIR("/usr/x86_64-redhat-linux/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/x86_64-redhat-linux/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
# SECTIONS
# {
# /* Read-only sections, merged into text segment: */
# PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x400000)); . = SEGMENT_START("text-segment", 0x400000) + SIZEOF_HEADERS;
# .interp : { *(.interp) }
# <...>
# See also:
# * Generate a map file with "$CC -Wl,-Map=output.map"
# * GNU LD Manual: https://sourceware.org/binutils/docs/ld/
if [ "$CC" = "" ]; then
CC=gcc
fi
$CC "$@" -Wl,-verbose /dev/null