aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorThomas Preud'homme <thomas.preudhomme@arm.com>2016-08-04 15:54:57 +0100
committerThomas Preud'homme <thomas.preudhomme@arm.com>2016-08-04 15:54:57 +0100
commit54ddd295b505efe4b07cc1e939d4e150032603d8 (patch)
tree58c9a2c7639072764628a540c2340e221e3b87d5 /ld/emultempl
parent4ba2ef8fbe74716708e5ce0bcba4f3b1cc8ac99a (diff)
downloadgdb-54ddd295b505efe4b07cc1e939d4e150032603d8.zip
gdb-54ddd295b505efe4b07cc1e939d4e150032603d8.tar.gz
gdb-54ddd295b505efe4b07cc1e939d4e150032603d8.tar.bz2
2016-08-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
bfd/ * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add one parameter. * bfd-in2.h: Regenerate. * elf32-arm.c (struct elf32_arm_link_hash_table): Declare new cmse_implib field. (bfd_elf32_arm_set_target_relocs): Add new parameter to initialize cmse_implib field in struct elf32_arm_link_hash_table. (elf32_arm_filter_cmse_symbols): New function. (elf32_arm_filter_implib_symbols): Likewise. (elf_backend_filter_implib_symbols): Define to elf32_arm_filter_implib_symbols. ld/ * emultempl/armelf.em (cmse_implib): Declare and define this new static variable. (arm_elf_create_output_section_statements): Add new cmse_implib parameter. (OPTION_CMSE_IMPLIB): Define macro. (PARSE_AND_LIST_LONGOPTS): Add entry for new --cmse-implib switch. (PARSE_AND_LIST_OPTIONS): Likewise. (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_CMSE_IMPLIB case. * ld.texinfo (--cmse-implib): Document new option. * testsuite/ld-arm/arm-elf.exp (Secure gateway import library generation): New test. (Secure gateway import library generation: errors): Likewise. * testsuite/ld-arm/cmse-implib.s: New file. * testsuite/ld-arm/cmse-implib-errors.out: Likewise. * testsuite/ld-arm/cmse-implib.rd: Likewise.
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/armelf.em11
1 files changed, 10 insertions, 1 deletions
diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em
index 6074824..c21f6a8 100644
--- a/ld/emultempl/armelf.em
+++ b/ld/emultempl/armelf.em
@@ -42,6 +42,7 @@ static int no_wchar_size_warning = 0;
static int pic_veneer = 0;
static int merge_exidx_entries = -1;
static int fix_arm1176 = 1;
+static int cmse_implib = 0;
static void
gld${EMULATION_NAME}_before_parse (void)
@@ -514,7 +515,7 @@ arm_elf_create_output_section_statements (void)
no_enum_size_warning,
no_wchar_size_warning,
pic_veneer, fix_cortex_a8,
- fix_arm1176);
+ fix_arm1176, cmse_implib);
stub_file = lang_add_input_file ("linker stubs",
lang_input_file_is_fake_enum,
@@ -583,6 +584,7 @@ PARSE_AND_LIST_PROLOGUE='
#define OPTION_NO_FIX_ARM1176 318
#define OPTION_LONG_PLT 319
#define OPTION_STM32L4XX_FIX 320
+#define OPTION_CMSE_IMPLIB 321
'
PARSE_AND_LIST_SHORTOPTS=p
@@ -609,6 +611,7 @@ PARSE_AND_LIST_LONGOPTS='
{ "fix-arm1176", no_argument, NULL, OPTION_FIX_ARM1176 },
{ "no-fix-arm1176", no_argument, NULL, OPTION_NO_FIX_ARM1176 },
{ "long-plt", no_argument, NULL, OPTION_LONG_PLT },
+ { "cmse-implib", no_argument, NULL, OPTION_CMSE_IMPLIB },
'
PARSE_AND_LIST_OPTIONS='
@@ -629,6 +632,8 @@ PARSE_AND_LIST_OPTIONS='
fprintf (file, _(" --pic-veneer Always generate PIC interworking veneers\n"));
fprintf (file, _(" --long-plt Generate long .plt entries\n"
" to handle large .plt/.got displacements\n"));
+ fprintf (file, _(" --cmse-implib Make import library to be a secure gateway import\n"
+ " library as per ARMv8-M Security Extensions\n"));
fprintf (file, _("\
--stub-group-size=N Maximum size of a group of input sections that\n\
can be handled by one stub section. A negative\n\
@@ -749,6 +754,10 @@ PARSE_AND_LIST_ARGS_CASES='
case OPTION_LONG_PLT:
bfd_elf32_arm_use_long_plt ();
break;
+
+ case OPTION_CMSE_IMPLIB:
+ cmse_implib = 1;
+ break;
'
# We have our own before_allocation etc. functions, but they call