From bbec1a5db7d3de1322cdc5a859d0c2a44ae1231f Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 13 May 2015 14:12:38 +0930 Subject: [GOLD] Add PowerPC64 -fsplit-stack support PowerPC64 ELFv1 requires a tweak to find_functions in order to return code addresses, rather than OPD entry addresses. * reloc.cc (Sized_relobj_file::find_functions): Use function_location. * powerpc.cc (Target_powerpc::do_calls_non_split): New function. (addi_12_1, addis_2_12, addis_12_1, cmpld_7_12_0): New constants. (lis_0): Rename from lis_0_0. --- gold/reloc.cc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'gold/reloc.cc') diff --git a/gold/reloc.cc b/gold/reloc.cc index 910c4ee..3c9f7a9 100644 --- a/gold/reloc.cc +++ b/gold/reloc.cc @@ -1415,13 +1415,21 @@ Sized_relobj_file::find_functions( continue; bool is_ordinary; - unsigned int sym_shndx = this->adjust_sym_shndx(i, isym.get_st_shndx(), - &is_ordinary); - if (!is_ordinary || sym_shndx != shndx) + Symbol_location loc; + loc.shndx = this->adjust_sym_shndx(i, isym.get_st_shndx(), + &is_ordinary); + if (!is_ordinary) + continue; + + loc.object = this; + loc.offset = isym.get_st_value(); + parameters->target().function_location(&loc); + + if (loc.shndx != shndx) continue; section_offset_type value = - convert_to_section_size_type(isym.get_st_value()); + convert_to_section_size_type(loc.offset); section_size_type fnsize = convert_to_section_size_type(isym.get_st_size()); -- cgit v1.1