x86: Move x86-specific linker options to elf_linker_x86_params
[external/binutils.git] / ld / emulparams / elf32_x86_64.sh
1 . ${srcdir}/emulparams/plt_unwind.sh
2 . ${srcdir}/emulparams/extern_protected_data.sh
3 . ${srcdir}/emulparams/dynamic_undefined_weak.sh
4 . ${srcdir}/emulparams/reloc_overflow.sh
5 . ${srcdir}/emulparams/call_nop.sh
6 . ${srcdir}/emulparams/cet.sh
7 SCRIPT_NAME=elf
8 ELFSIZE=32
9 OUTPUT_FORMAT="elf32-x86-64"
10 NO_REL_RELOCS=yes
11 TEXT_START_ADDR=0x400000
12 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
13 COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
14 ARCH="i386:x64-32"
15 MACHINE=
16 TEMPLATE_NAME=elf32
17 EXTRA_EM_FILE="elf-x86"
18 GENERATE_SHLIB_SCRIPT=yes
19 GENERATE_PIE_SCRIPT=yes
20 NO_SMALL_DATA=yes
21 LARGE_SECTIONS=yes
22 LARGE_BSS_AFTER_BSS=
23 SEPARATE_GOTPLT="SIZEOF (.got.plt) >= 24 ? 24 : 0"
24 IREL_IN_PLT=
25 # These sections are placed right after .plt section.
26 OTHER_PLT_SECTIONS="
27 .plt.got      ${RELOCATING-0} : { *(.plt.got) }
28 .plt.sec      ${RELOCATING-0} : { *(.plt.sec) }
29 "
30
31 if [ "x${host}" = "x${target}" ]; then
32   case " $EMULATION_LIBPATH " in
33     *" ${EMULATION_NAME} "*)
34       NATIVE=yes
35   esac
36 fi
37
38 # Linux modifies the default library search path to first include
39 # a 32-bit specific directory.
40 case "$target" in
41   x86_64*-linux*|i[3-7]86-*-linux-*)
42     case "$EMULATION_NAME" in
43       *32*)
44         LIBPATH_SUFFIX=x32
45         LIBPATH_SUFFIX_SKIP=64
46         ;;
47       *64*)
48         LIBPATH_SUFFIX=64
49         ;;
50     esac
51     ;;
52 esac