aboutsummaryrefslogtreecommitdiff
path: root/bfd/xcofflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2015-12-01 11:40:25 +1030
committerAlan Modra <amodra@gmail.com>2015-12-01 13:40:04 +1030
commitb560e2acdd41fe6b6228b11c2d82ad2a96188153 (patch)
treea04f48bcc4100177a67c176ff389c9494816995b /bfd/xcofflink.c
parent23d61901b0dadd93a8d8e26fd113691e5b9ead4f (diff)
downloadgdb-b560e2acdd41fe6b6228b11c2d82ad2a96188153.zip
gdb-b560e2acdd41fe6b6228b11c2d82ad2a96188153.tar.gz
gdb-b560e2acdd41fe6b6228b11c2d82ad2a96188153.tar.bz2
Don't use BFD_TRADITIONAL_FORMAT flag in COFF support
info->traditional_format is available, or can be easily made available. This relegates BFD_TRADITIONAL_FORMAT to AOUT use only. * coff-rs6000.c (_bfd_xcoff_put_symbol_name): Replace abfd param with info param. Test info->traditional_format rather than BFD_TRADITIONAL_FORMAT flag. * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Likewise. * libxcoff.h (struct xcoff_backend_data_rec): Update _xcoff_put_symbol_name prototype. (bfd_xcoff_put_symbol_name): Add info param. * xcofflink.c (xcoff_find_tc0): Update bfd_xcoff_put_symbol_name call. (xcoff_write_global_symbol): Likewise. (xcoff_link_input_bfd): Test info->traditional_format rather than BFD_TRADITIONAL_FORMAT flag. * cofflink.c (_bfd_coff_final_link): Likewise. (_bfd_coff_link_input_bfd, _bfd_coff_write_global_sym): Likewise.
Diffstat (limited to 'bfd/xcofflink.c')
-rw-r--r--bfd/xcofflink.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c
index 7597750..443ff77 100644
--- a/bfd/xcofflink.c
+++ b/bfd/xcofflink.c
@@ -4145,7 +4145,7 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *flinfo,
if (! flinfo->info->keep_memory)
copy = TRUE;
hash = TRUE;
- if ((output_bfd->flags & BFD_TRADITIONAL_FORMAT) != 0)
+ if (flinfo->info->traditional_format)
hash = FALSE;
if (! _bfd_coff_get_external_symbols (input_bfd))
@@ -5118,7 +5118,8 @@ xcoff_find_tc0 (bfd *output_bfd, struct xcoff_final_link_info *flinfo)
xcoff_data (output_bfd)->sntoc = section_index;
/* Fill out the TC0 symbol. */
- if (!bfd_xcoff_put_symbol_name (output_bfd, flinfo->strtab, &irsym, "TOC"))
+ if (!bfd_xcoff_put_symbol_name (output_bfd, flinfo->info, flinfo->strtab,
+ &irsym, "TOC"))
return FALSE;
irsym.n_value = best_address;
irsym.n_scnum = section_index;
@@ -5383,7 +5384,8 @@ xcoff_write_global_symbol (struct bfd_hash_entry *bh, void * inf)
the reloc. */
if (flinfo->info->strip != strip_all)
{
- result = bfd_xcoff_put_symbol_name (output_bfd, flinfo->strtab,
+ result = bfd_xcoff_put_symbol_name (output_bfd, flinfo->info,
+ flinfo->strtab,
&irsym, h->root.root.string);
if (!result)
return FALSE;
@@ -5557,8 +5559,8 @@ xcoff_write_global_symbol (struct bfd_hash_entry *bh, void * inf)
h->indx = obj_raw_syment_count (output_bfd);
- result = bfd_xcoff_put_symbol_name (output_bfd, flinfo->strtab, &isym,
- h->root.root.string);
+ result = bfd_xcoff_put_symbol_name (output_bfd, flinfo->info, flinfo->strtab,
+ &isym, h->root.root.string);
if (!result)
return FALSE;