Remove path name from test case
[binutils-gdb.git] / ld / emulparams / elf32lriscv-defs.sh
1 # This is an ELF platform.
2 SCRIPT_NAME=elf
3 ARCH=riscv
4 NO_REL_RELOCS=yes
5
6 TEMPLATE_NAME=elf
7 EXTRA_EM_FILE=riscvelf
8
9 ELFSIZE=32
10
11 if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then
12 case " $EMULATION_LIBPATH " in
13 *" ${EMULATION_NAME} "*)
14 NATIVE=yes
15 ;;
16 esac
17 fi
18
19 # Enable shared library support for everything except an embedded elf target.
20 case "$target" in
21 riscv*-elf)
22 ;;
23 *)
24 GENERATE_SHLIB_SCRIPT=yes
25 GENERATE_PIE_SCRIPT=yes
26 ;;
27 esac
28
29 IREL_IN_PLT=
30 TEXT_START_ADDR=0x10000
31 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
32 COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
33
34 DATA_START_SYMBOLS="${CREATE_SHLIB-__DATA_BEGIN__ = .;}"
35
36 SDATA_START_SYMBOLS="${CREATE_SHLIB-__SDATA_BEGIN__ = .;}
37 *(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*)"
38
39 INITIAL_READONLY_SECTIONS=".interp : { *(.interp) } ${CREATE_PIE-${INITIAL_READONLY_SECTIONS}}"
40 INITIAL_READONLY_SECTIONS="${RELOCATING+${CREATE_SHLIB-${INITIAL_READONLY_SECTIONS}}}"
41
42 # We must cover as much of sdata as possible if it exists. If sdata+bss is
43 # smaller than 0x1000 then we should start from bss end to cover as much of
44 # the program as possible. But we can't allow gp to cover any of rodata, as
45 # the address of variables in rodata may change during relaxation, so we start
46 # from data in that case.
47 OTHER_END_SYMBOLS="${CREATE_SHLIB-__BSS_END__ = .;
48 __global_pointer$ = MIN(__SDATA_BEGIN__ + 0x800,
49 MAX(__DATA_BEGIN__ + 0x800, __BSS_END__ - 0x800));}"
50
51 # Put .got before .data
52 DATA_GOT=" "
53 SEPARATE_GOTPLT="SIZEOF (.got.plt) >= 8 ? 8 : 0"