aboutsummaryrefslogtreecommitdiff
path: root/gold/reloc.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-11-15 23:46:46 +0000
committerIan Lance Taylor <iant@google.com>2007-11-15 23:46:46 +0000
commit4f4c5f80c7482fbd1c2fd5a3b96547f5099bf3fd (patch)
treed4dbb773a8511bc57cfe9b5462fa44e3c2c2b19e /gold/reloc.h
parent02d2ba740273e3f539501337eebf0c6007af0b4b (diff)
downloadgdb-4f4c5f80c7482fbd1c2fd5a3b96547f5099bf3fd.zip
gdb-4f4c5f80c7482fbd1c2fd5a3b96547f5099bf3fd.tar.gz
gdb-4f4c5f80c7482fbd1c2fd5a3b96547f5099bf3fd.tar.bz2
From Cary Coutant: Count textrel with output sections rather than
setting a flag as we add each reloc in the target code.
Diffstat (limited to 'gold/reloc.h')
-rw-r--r--gold/reloc.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/gold/reloc.h b/gold/reloc.h
index 51b6143..2ff49d8 100644
--- a/gold/reloc.h
+++ b/gold/reloc.h
@@ -37,6 +37,7 @@ class Relobj;
class Read_relocs_data;
class Symbol;
class Layout;
+class Output_section;
template<int size>
class Sized_symbol;
@@ -539,12 +540,12 @@ class Copy_relocs
// index of the section to which the reloc is being applied.
void
save(Symbol* sym, Relobj*, unsigned int shndx,
- const elfcpp::Rel<size, big_endian>&);
+ Output_section* output_section, const elfcpp::Rel<size, big_endian>&);
// Save a Rela against SYM for possible emission later.
void
save(Symbol* sym, Relobj*, unsigned int shndx,
- const elfcpp::Rela<size, big_endian>&);
+ Output_section* output_section, const elfcpp::Rela<size, big_endian>&);
// Return whether there are any relocs to emit. This also discards
// entries which need not be emitted.
@@ -567,9 +568,11 @@ class Copy_relocs
public:
Copy_reloc_entry(Symbol* sym, unsigned int reloc_type,
Relobj* relobj, unsigned int shndx,
+ Output_section* output_section,
Address address, Addend addend)
: sym_(sym), reloc_type_(reloc_type), relobj_(relobj),
- shndx_(shndx), address_(address), addend_(addend)
+ shndx_(shndx), output_section_(output_section),
+ address_(address), addend_(addend)
{ }
// Return whether we should emit this reloc. If we should not
@@ -590,6 +593,7 @@ class Copy_relocs
unsigned int reloc_type_;
Relobj* relobj_;
unsigned int shndx_;
+ Output_section* output_section_;
Address address_;
Addend addend_;
};