X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Fcoff64-rs6000.c;h=15e636e50e64a6249c4727d36b77b312aa507888;hb=d2c7a1a63b98c1add3d78ba71ffa9f2a105c1cd4;hp=6be1583a4be1e74e6099543e62f040cdae554252;hpb=858ef0ce3bae131931bd6f1c24fab4acb90f89df;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c index 6be1583a4b..15e636e50e 100644 --- a/bfd/coff64-rs6000.c +++ b/bfd/coff64-rs6000.c @@ -353,11 +353,11 @@ _bfd_xcoff64_swap_sym_out (abfd, inp, extp) } static void -_bfd_xcoff64_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1) +_bfd_xcoff64_swap_aux_in (abfd, ext1, type, in_class, indx, numaux, in1) bfd *abfd; PTR ext1; int type; - int class; + int in_class; int indx; int numaux; PTR in1; @@ -365,7 +365,7 @@ _bfd_xcoff64_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1) union external_auxent *ext = (union external_auxent *) ext1; union internal_auxent *in = (union internal_auxent *) in1; - switch (class) + switch (in_class) { case C_FILE: if (ext->x_file.x_n.x_zeroes[0] == 0) @@ -381,6 +381,7 @@ _bfd_xcoff64_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1) /* RS/6000 "csect" auxents */ case C_EXT: + case C_AIX_WEAKEXT: case C_HIDEXT: if (indx + 1 == numaux) { @@ -419,7 +420,8 @@ _bfd_xcoff64_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1) break; } - if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class)) + if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) + || ISTAG (in_class)) { in->x_sym.x_fcnary.x_fcn.x_lnnoptr = H_GET_64 (abfd, ext->x_sym.x_fcnary.x_fcn.x_lnnoptr); @@ -443,11 +445,11 @@ _bfd_xcoff64_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1) } static unsigned int -_bfd_xcoff64_swap_aux_out (abfd, inp, type, class, indx, numaux, extp) +_bfd_xcoff64_swap_aux_out (abfd, inp, type, in_class, indx, numaux, extp) bfd *abfd; PTR inp; int type; - int class; + int in_class; int indx ATTRIBUTE_UNUSED; int numaux ATTRIBUTE_UNUSED; PTR extp; @@ -456,7 +458,7 @@ _bfd_xcoff64_swap_aux_out (abfd, inp, type, class, indx, numaux, extp) union external_auxent *ext = (union external_auxent *) extp; memset ((PTR) ext, 0, bfd_coff_auxesz (abfd)); - switch (class) + switch (in_class) { case C_FILE: if (in->x_file.x_n.x_zeroes == 0) @@ -473,6 +475,7 @@ _bfd_xcoff64_swap_aux_out (abfd, inp, type, class, indx, numaux, extp) /* RS/6000 "csect" auxents */ case C_EXT: + case C_AIX_WEAKEXT: case C_HIDEXT: if (indx + 1 == numaux) { @@ -504,7 +507,8 @@ _bfd_xcoff64_swap_aux_out (abfd, inp, type, class, indx, numaux, extp) break; } - if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class)) + if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) + || ISTAG (in_class)) { H_PUT_64 (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext->x_sym.x_fcnary.x_fcn.x_lnnoptr); @@ -1133,7 +1137,8 @@ xcoff64_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto, going to global linkage code, we can replace the load with a cror. */ if (NULL != h - && bfd_link_hash_defined == h->root.type + && (bfd_link_hash_defined == h->root.type + || bfd_link_hash_defweak == h->root.type) && section_offset + 8 <= input_section->size) { bfd_byte *pnext; @@ -1176,7 +1181,8 @@ xcoff64_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto, howto->dst_mask = howto->src_mask; if (h != NULL - && h->root.type == bfd_link_hash_defined + && (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) && bfd_is_abs_section (h->root.u.def.section) && section_offset + 4 <= input_section->size) { @@ -1588,11 +1594,11 @@ reloc_howto_type xcoff64_howto_table[] = EMPTY_HOWTO (0xe), - /* Non-relocating reference. */ + /* Non-relocating reference. Bitsize is 1 so that r_rsize is 0. */ HOWTO (R_REF, /* type */ 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ + 0, /* size (0 = byte, 1 = short, 2 = long) */ + 1, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ @@ -1876,6 +1882,8 @@ xcoff64_reloc_type_lookup (abfd, code) return &xcoff64_howto_table[0x1c]; case BFD_RELOC_64: return &xcoff64_howto_table[0]; + case BFD_RELOC_NONE: + return &xcoff64_howto_table[0xf]; default: return NULL; } @@ -2735,13 +2743,13 @@ const bfd_target rs6000coff64_vec = /* Copy */ _bfd_xcoff_copy_private_bfd_data, - ((bfd_boolean (*) (bfd *, bfd *)) bfd_true), + _bfd_generic_bfd_merge_private_bfd_data, _bfd_generic_init_private_section_data, - ((bfd_boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true), - ((bfd_boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true), - ((bfd_boolean (*) (bfd *, bfd *)) bfd_true), - ((bfd_boolean (*) (bfd *, flagword)) bfd_true), - ((bfd_boolean (*) (bfd *, void * )) bfd_true), + _bfd_generic_bfd_copy_private_section_data, + _bfd_generic_bfd_copy_private_symbol_data, + _bfd_generic_bfd_copy_private_header_data, + _bfd_generic_bfd_set_private_flags, + _bfd_generic_bfd_print_private_bfd_data, /* Core */ coff_core_file_failing_command, @@ -2750,8 +2758,8 @@ const bfd_target rs6000coff64_vec = /* Archive */ xcoff64_slurp_armap, - bfd_false, - ((bfd_boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false), + _bfd_noarchive_slurp_extended_name_table, + _bfd_noarchive_construct_extended_name_table, bfd_dont_truncate_arname, _bfd_xcoff_write_armap, _bfd_xcoff_read_ar_hdr, @@ -2794,6 +2802,7 @@ const bfd_target rs6000coff64_vec = _bfd_generic_link_hash_table_free, _bfd_xcoff_bfd_link_add_symbols, _bfd_generic_link_just_syms, + _bfd_generic_copy_link_hash_symbol_type, _bfd_xcoff_bfd_final_link, _bfd_generic_link_split_section, bfd_generic_gc_sections, @@ -2801,6 +2810,7 @@ const bfd_target rs6000coff64_vec = bfd_generic_is_group_section, bfd_generic_discard_group, _bfd_generic_section_already_linked, + _bfd_xcoff_define_common_symbol, /* Dynamic */ _bfd_xcoff_get_dynamic_symtab_upper_bound, @@ -2988,13 +2998,13 @@ const bfd_target aix5coff64_vec = /* Copy */ _bfd_xcoff_copy_private_bfd_data, - ((bfd_boolean (*) (bfd *, bfd *)) bfd_true), + _bfd_generic_bfd_merge_private_bfd_data, _bfd_generic_init_private_section_data, - ((bfd_boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true), - ((bfd_boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true), - ((bfd_boolean (*) (bfd *, bfd *)) bfd_true), - ((bfd_boolean (*) (bfd *, flagword)) bfd_true), - ((bfd_boolean (*) (bfd *, void * )) bfd_true), + _bfd_generic_bfd_copy_private_section_data, + _bfd_generic_bfd_copy_private_symbol_data, + _bfd_generic_bfd_copy_private_header_data, + _bfd_generic_bfd_set_private_flags, + _bfd_generic_bfd_print_private_bfd_data, /* Core */ xcoff64_core_file_failing_command, @@ -3003,8 +3013,8 @@ const bfd_target aix5coff64_vec = /* Archive */ xcoff64_slurp_armap, - bfd_false, - ((bfd_boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false), + _bfd_noarchive_slurp_extended_name_table, + _bfd_noarchive_construct_extended_name_table, bfd_dont_truncate_arname, _bfd_xcoff_write_armap, _bfd_xcoff_read_ar_hdr, @@ -3047,6 +3057,7 @@ const bfd_target aix5coff64_vec = _bfd_generic_link_hash_table_free, _bfd_xcoff_bfd_link_add_symbols, _bfd_generic_link_just_syms, + _bfd_generic_copy_link_hash_symbol_type, _bfd_xcoff_bfd_final_link, _bfd_generic_link_split_section, bfd_generic_gc_sections, @@ -3054,6 +3065,7 @@ const bfd_target aix5coff64_vec = bfd_generic_is_group_section, bfd_generic_discard_group, _bfd_generic_section_already_linked, + _bfd_xcoff_define_common_symbol, /* Dynamic */ _bfd_xcoff_get_dynamic_symtab_upper_bound,