aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorMark Shinwell <shinwell@codesourcery.com>2007-03-20 14:24:57 +0000
committerMark Shinwell <shinwell@codesourcery.com>2007-03-20 14:24:57 +0000
commitbf21ed7807b864b6f137d093bbf0164b443b504b (patch)
tree819411982880123e6586a41b8522b37548a8a9f3 /ld
parentcb2eed63754dc9b353aeb62bba1aca2d0a33c5ee (diff)
downloadgdb-bf21ed7807b864b6f137d093bbf0164b443b504b.zip
gdb-bf21ed7807b864b6f137d093bbf0164b443b504b.tar.gz
gdb-bf21ed7807b864b6f137d093bbf0164b443b504b.tar.bz2
bfd/
* bfd-in.h (bfd_elf32_arm_set_target_relocs): Add "bfd *" argument and extra last argument. * bfd-in2.h: Regenerate. * elf32-arm.c (elf32_arm_obj_tdata): Add no_enum_size_warning member. (bfd_elf32_arm_set_target_relocs): Add "bfd *" argument and extra last argument. Set no_enum_size_warning appropriately. (elf32_arm_merge_eabi_attributes): Improve enum sizes diagnostic, suppressing it when no_enum_size_warning dictates. ld/ * ld.texinfo: Document --no-enum-size-warning. * emultempl/armelf.em (no_enum_size_warning): New. (arm_elf_create_output_section_statements): Correct typo in comment. Pass no_enum_size_warning to bfd_elf32_arm_set_target_relocs. (PARSE_AND_LIST_PROLOGUE): Define OPTION_NO_ENUM_SIZE_WARNING. (PARSE_AND_LIST_OPTIONS): Document --no-enum-size-warning. (PARSE_AND_LIST_ARGS_CASES): Add OPTION_NO_ENUM_SIZE_WARNING case.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog12
-rw-r--r--ld/emultempl/armelf.em15
-rw-r--r--ld/ld.texinfo9
3 files changed, 33 insertions, 3 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 817e4e8..dbb1f2a 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,15 @@
+2007-03-18 Mark Shinwell <shinwell@codesourcery.com>
+
+ * ld.texinfo: Document --no-enum-size-warning.
+ * emultempl/armelf.em (no_enum_size_warning): New.
+ (arm_elf_create_output_section_statements): Correct typo
+ in comment. Pass no_enum_size_warning to
+ bfd_elf32_arm_set_target_relocs.
+ (PARSE_AND_LIST_PROLOGUE): Define OPTION_NO_ENUM_SIZE_WARNING.
+ (PARSE_AND_LIST_OPTIONS): Document --no-enum-size-warning.
+ (PARSE_AND_LIST_ARGS_CASES): Add OPTION_NO_ENUM_SIZE_WARNING
+ case.
+
2007-03-19 Bernd Schmidt <bernd.schmidt@analog.com>
* configure.tgt (bfin-*-elf, bfin-*-uclinux*): Add targ_extra_libpath.
diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em
index 4522a8b..f1c797b 100644
--- a/ld/emultempl/armelf.em
+++ b/ld/emultempl/armelf.em
@@ -36,6 +36,7 @@ static char *target2_type = "${TARGET2_TYPE}";
static int fix_v4bx = 0;
static int use_blx = 0;
static bfd_arm_vfp11_fix vfp11_denorm_fix = BFD_ARM_VFP11_FIX_DEFAULT;
+static int no_enum_size_warning = 0;
static void
gld${EMULATION_NAME}_before_parse (void)
@@ -233,13 +234,14 @@ arm_elf_finish (void)
thumb_entry_symbol);
}
-/* This is a convenitent point to tell BFD about target specific flags.
+/* This is a convenient point to tell BFD about target specific flags.
After the output has been created, but before inputs are read. */
static void
arm_elf_create_output_section_statements (void)
{
- bfd_elf32_arm_set_target_relocs (&link_info, target1_is_rel, target2_type,
- fix_v4bx, use_blx, vfp11_denorm_fix);
+ bfd_elf32_arm_set_target_relocs (output_bfd, &link_info, target1_is_rel,
+ target2_type, fix_v4bx, use_blx,
+ vfp11_denorm_fix, no_enum_size_warning);
}
EOF
@@ -256,6 +258,7 @@ PARSE_AND_LIST_PROLOGUE='
#define OPTION_FIX_V4BX 306
#define OPTION_USE_BLX 307
#define OPTION_VFP11_DENORM_FIX 308
+#define OPTION_NO_ENUM_SIZE_WARNING 309
'
PARSE_AND_LIST_SHORTOPTS=p
@@ -270,6 +273,7 @@ PARSE_AND_LIST_LONGOPTS='
{ "fix-v4bx", no_argument, NULL, OPTION_FIX_V4BX},
{ "use-blx", no_argument, NULL, OPTION_USE_BLX},
{ "vfp11-denorm-fix", required_argument, NULL, OPTION_VFP11_DENORM_FIX},
+ { "no-enum-size-warning", no_argument, NULL, OPTION_NO_ENUM_SIZE_WARNING},
'
PARSE_AND_LIST_OPTIONS='
@@ -281,6 +285,7 @@ PARSE_AND_LIST_OPTIONS='
fprintf (file, _(" --fix-v4bx Rewrite BX rn as MOV pc, rn for ARMv4\n"));
fprintf (file, _(" --use-blx Enable use of BLX instructions\n"));
fprintf (file, _(" --vfp11-denorm-fix Specify how to fix VFP11 denorm erratum\n"));
+ fprintf (file, _(" --no-enum-size-warning Don'\''t warn about objects with incompatible enum sizes\n"));
'
PARSE_AND_LIST_ARGS_CASES='
@@ -326,6 +331,10 @@ PARSE_AND_LIST_ARGS_CASES='
else
einfo (_("Unrecognized VFP11 fix type '\''%s'\''.\n"), optarg);
break;
+
+ case OPTION_NO_ENUM_SIZE_WARNING:
+ no_enum_size_warning = 1;
+ break;
'
# We have our own after_open and before_allocation functions, but they call
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index eb8d007..1ffabf4 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -5519,6 +5519,15 @@ instruction. The original instruction is then replaced with a branch to
the veneer. The extra cycles required to call and return from the veneer
are sufficient to avoid the erratum in both the scalar and vector cases.
+@cindex NO_ENUM_SIZE_WARNING
+@kindex --no-enum-size-warning
+The @samp{--no-enum-size-warning} switch prevents the linker from
+warning when linking object files that specify incompatible EABI
+enumeration size attributes. For example, with this switch enabled,
+linking of an object file using 32-bit enumeration values with another
+using enumeration values fitted into the smallest possible space will
+not be diagnosed.
+
@ifclear GENERIC
@lowersections
@end ifclear