aboutsummaryrefslogtreecommitdiff
path: root/gold/reloc.cc
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2015-05-13 14:12:38 +0930
committerAlan Modra <amodra@gmail.com>2015-05-16 22:49:57 +0930
commitbbec1a5db7d3de1322cdc5a859d0c2a44ae1231f (patch)
treebe322c429865264c764795a10a53687e977f9d0d /gold/reloc.cc
parent36de76f9cc2eea0bd5f1b7ce74ef60e1aa0b27c2 (diff)
downloadgdb-bbec1a5db7d3de1322cdc5a859d0c2a44ae1231f.zip
gdb-bbec1a5db7d3de1322cdc5a859d0c2a44ae1231f.tar.gz
gdb-bbec1a5db7d3de1322cdc5a859d0c2a44ae1231f.tar.bz2
[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.
Diffstat (limited to 'gold/reloc.cc')
-rw-r--r--gold/reloc.cc16
1 files changed, 12 insertions, 4 deletions
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<size, big_endian>::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());