aboutsummaryrefslogtreecommitdiff
path: root/ld/emulparams
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2011-07-14 02:38:43 +0000
committerAlan Modra <amodra@gmail.com>2011-07-14 02:38:43 +0000
commitfb42df5ed908e2bb9ce52a389981ea8b1c97cdf8 (patch)
treedd2e25fbbef27a1c00d15405dcf871d3aba603d6 /ld/emulparams
parente9552f7ebbcd2438fe50dbf1fb4b1926c96adb75 (diff)
downloadgdb-fb42df5ed908e2bb9ce52a389981ea8b1c97cdf8.zip
gdb-fb42df5ed908e2bb9ce52a389981ea8b1c97cdf8.tar.gz
gdb-fb42df5ed908e2bb9ce52a389981ea8b1c97cdf8.tar.bz2
* emultempl/elf32.em (gld${EMULATION_NAME}_add_options,
gld${EMULATION_NAME}_handle_option, gld${EMULATION_NAME}_list_options): Provide --build-id, -z defs, -z muldefs, -z max-page-size, -z common-page-size, -z execstack, -z noexecstack for all targets. Add help for --exclude-libs. (OPTION_LD_GENERATED_UNWIND_INFO, OPTION_NO_LD_GENERATED_UNWIND_INFO): Move this.. (gld${EMULATION_NAME}_handle_option): ..and code handling --ld-generated-unwind-info and --no-ld-generated-unwind-info.. * emulparams/plt_unwind.sh: ..to here. New file. Add help. * emulparams/elf32_x86_64.sh: Include plt_unwind.sh. * emulparams/elf_i386.sh: Likewise. * emulparams/elf_i386_chaos.sh: Likewise. * emulparams/elf_i386_ldso.sh: Likewise. * emulparams/elf_l1om.sh: Likewise. * emulparams/elf_x86_64.sh: Likewise.
Diffstat (limited to 'ld/emulparams')
-rw-r--r--ld/emulparams/elf32_x86_64.sh1
-rw-r--r--ld/emulparams/elf_i386.sh1
-rw-r--r--ld/emulparams/elf_i386_chaos.sh1
-rw-r--r--ld/emulparams/elf_i386_ldso.sh1
-rw-r--r--ld/emulparams/elf_l1om.sh1
-rw-r--r--ld/emulparams/elf_x86_64.sh1
-rw-r--r--ld/emulparams/plt_unwind.sh28
7 files changed, 34 insertions, 0 deletions
diff --git a/ld/emulparams/elf32_x86_64.sh b/ld/emulparams/elf32_x86_64.sh
index 8895e29..d26a67f 100644
--- a/ld/emulparams/elf32_x86_64.sh
+++ b/ld/emulparams/elf32_x86_64.sh
@@ -1,3 +1,4 @@
+. ${srcdir}/emulparams/plt_unwind.sh
SCRIPT_NAME=elf
ELFSIZE=32
OUTPUT_FORMAT="elf32-x86-64"
diff --git a/ld/emulparams/elf_i386.sh b/ld/emulparams/elf_i386.sh
index d480811..1d1e4b4 100644
--- a/ld/emulparams/elf_i386.sh
+++ b/ld/emulparams/elf_i386.sh
@@ -1,3 +1,4 @@
+. ${srcdir}/emulparams/plt_unwind.sh
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-i386"
NO_RELA_RELOCS=yes
diff --git a/ld/emulparams/elf_i386_chaos.sh b/ld/emulparams/elf_i386_chaos.sh
index 1322174..b3005e1 100644
--- a/ld/emulparams/elf_i386_chaos.sh
+++ b/ld/emulparams/elf_i386_chaos.sh
@@ -1,3 +1,4 @@
+. ${srcdir}/emulparams/plt_unwind.sh
SCRIPT_NAME=elf_chaos
OUTPUT_FORMAT="elf32-i386"
TEXT_START_ADDR=0x40000000
diff --git a/ld/emulparams/elf_i386_ldso.sh b/ld/emulparams/elf_i386_ldso.sh
index 4b0d3fb..183731d 100644
--- a/ld/emulparams/elf_i386_ldso.sh
+++ b/ld/emulparams/elf_i386_ldso.sh
@@ -1,3 +1,4 @@
+. ${srcdir}/emulparams/plt_unwind.sh
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-i386"
NO_RELA_RELOCS=yes
diff --git a/ld/emulparams/elf_l1om.sh b/ld/emulparams/elf_l1om.sh
index 1af2360..1d22d69 100644
--- a/ld/emulparams/elf_l1om.sh
+++ b/ld/emulparams/elf_l1om.sh
@@ -1,3 +1,4 @@
+. ${srcdir}/emulparams/plt_unwind.sh
SCRIPT_NAME=elf
ELFSIZE=64
OUTPUT_FORMAT="elf64-l1om"
diff --git a/ld/emulparams/elf_x86_64.sh b/ld/emulparams/elf_x86_64.sh
index 0e93ad8..a921878 100644
--- a/ld/emulparams/elf_x86_64.sh
+++ b/ld/emulparams/elf_x86_64.sh
@@ -1,3 +1,4 @@
+. ${srcdir}/emulparams/plt_unwind.sh
SCRIPT_NAME=elf
ELFSIZE=64
OUTPUT_FORMAT="elf64-x86-64"
diff --git a/ld/emulparams/plt_unwind.sh b/ld/emulparams/plt_unwind.sh
new file mode 100644
index 0000000..c832570
--- /dev/null
+++ b/ld/emulparams/plt_unwind.sh
@@ -0,0 +1,28 @@
+PARSE_AND_LIST_PROLOGUE='
+#define OPTION_LD_GENERATED_UNWIND_INFO 301
+#define OPTION_NO_LD_GENERATED_UNWIND_INFO 302
+'
+
+PARSE_AND_LIST_LONGOPTS='
+ {"ld-generated-unwind-info", no_argument, NULL,
+ OPTION_LD_GENERATED_UNWIND_INFO},
+ {"no-ld-generated-unwind-info", no_argument, NULL,
+ OPTION_NO_LD_GENERATED_UNWIND_INFO},
+'
+
+PARSE_AND_LIST_OPTIONS='
+ fprintf (file, _("\
+ --ld-generated-unwind-info Generate exception handling info for PLT.\n\
+ --no-ld-generated-unwind-info Don'\''t do so.\n"
+ ));
+'
+
+PARSE_AND_LIST_ARGS_CASES='
+ case OPTION_LD_GENERATED_UNWIND_INFO:
+ link_info.no_ld_generated_unwind_info = FALSE;
+ break;
+
+ case OPTION_NO_LD_GENERATED_UNWIND_INFO:
+ link_info.no_ld_generated_unwind_info = TRUE;
+ break;
+'