aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog12
-rw-r--r--bfd/bfd-in.h2
-rw-r--r--bfd/bfd-in2.h2
-rw-r--r--bfd/elf32-arm.c16
4 files changed, 25 insertions, 7 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 4a676b1..fd30fd3 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,15 @@
+2008-07-18 Joseph Myers <joseph@codesourcery.com>
+
+ * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add new parameter.
+ * bfd-in2.h: Regenerate.
+ * elf32-arm.c (struct elf_arm_obj_tdata): Add field
+ no_wchar_size_warning.
+ (bfd_elf32_arm_set_target_relocs): Add new parameter
+ no_wchar_warn.
+ (elf32_arm_merge_eabi_attributes): Give a warning, not an error,
+ for conflicting wchar_t attributes. Do not warn if
+ --no-wchar-size-warning. Make diagnostic text more specific.
+
2008-07-18 H.J. Lu <hongjiu.lu@intel.com>
PR ld/6748
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index 3a3fa3f..21f4f4c 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -860,7 +860,7 @@ extern bfd_boolean bfd_elf32_arm_process_before_allocation
void bfd_elf32_arm_set_target_relocs
(bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix,
- int, int);
+ int, int, int);
extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
(bfd *, struct bfd_link_info *);
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index c1ad8c7..087eff8 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -867,7 +867,7 @@ extern bfd_boolean bfd_elf32_arm_process_before_allocation
void bfd_elf32_arm_set_target_relocs
(bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix,
- int, int);
+ int, int, int);
extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
(bfd *, struct bfd_link_info *);
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 8fbaa35..8fc1542 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -2167,6 +2167,9 @@ struct elf_arm_obj_tdata
/* Zero to warn when linking objects with incompatible enum sizes. */
int no_enum_size_warning;
+
+ /* Zero to warn when linking objects with incompatible wchar_t sizes. */
+ int no_wchar_size_warning;
};
#define elf_arm_tdata(bfd) \
@@ -5271,7 +5274,8 @@ bfd_elf32_arm_set_target_relocs (struct bfd *output_bfd,
int fix_v4bx,
int use_blx,
bfd_arm_vfp11_fix vfp11_fix,
- int no_enum_warn, int pic_veneer)
+ int no_enum_warn, int no_wchar_warn,
+ int pic_veneer)
{
struct elf32_arm_link_hash_table *globals;
@@ -5296,6 +5300,7 @@ bfd_elf32_arm_set_target_relocs (struct bfd *output_bfd,
BFD_ASSERT (is_arm_elf (output_bfd));
elf_arm_tdata (output_bfd)->no_enum_size_warning = no_enum_warn;
+ elf_arm_tdata (output_bfd)->no_wchar_size_warning = no_wchar_warn;
}
/* Replace the target offset of a Thumb bl or b.w instruction. */
@@ -8315,13 +8320,14 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd)
out_attr[i].i = in_attr[i].i;
break;
case Tag_ABI_PCS_wchar_t:
- if (out_attr[i].i && in_attr[i].i && out_attr[i].i != in_attr[i].i)
+ if (out_attr[i].i && in_attr[i].i && out_attr[i].i != in_attr[i].i
+ && !elf_arm_tdata (obfd)->no_wchar_size_warning)
{
_bfd_error_handler
- (_("ERROR: %B: Conflicting definitions of wchar_t"), ibfd);
- return FALSE;
+ (_("warning: %B uses %u-byte wchar_t yet the output is to use %u-byte wchar_t; use of wchar_t values across objects may fail"),
+ ibfd, in_attr[i].i, out_attr[i].i);
}
- if (in_attr[i].i)
+ else if (in_attr[i].i && !out_attr[i].i)
out_attr[i].i = in_attr[i].i;
break;
case Tag_ABI_align8_needed: