summaryrefslogtreecommitdiffstats
path: root/binutils-2.22/gold/dynobj.h
diff options
context:
space:
mode:
authorBen Cheng <bccheng@google.com>2012-11-01 14:19:35 -0700
committerBen Cheng <bccheng@google.com>2012-11-01 14:27:04 -0700
commit6d5ce99288a663253fd2cde30516257f754cc776 (patch)
treed57b8b65cf7b807324908da748ba1845b8e2941a /binutils-2.22/gold/dynobj.h
parent6b95f5ef54a29597409e24d7fe6670238d58ff04 (diff)
downloadtoolchain_binutils-6d5ce99288a663253fd2cde30516257f754cc776.zip
toolchain_binutils-6d5ce99288a663253fd2cde30516257f754cc776.tar.gz
toolchain_binutils-6d5ce99288a663253fd2cde30516257f754cc776.tar.bz2
Refresh binutils to 2.22.90.
Missing local patches will be added after. Change-Id: I7e5f7529f165a48db48a07f08b85f36c2faa8d4a
Diffstat (limited to 'binutils-2.22/gold/dynobj.h')
-rw-r--r--binutils-2.22/gold/dynobj.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/binutils-2.22/gold/dynobj.h b/binutils-2.22/gold/dynobj.h
index 186b67c..e027485 100644
--- a/binutils-2.22/gold/dynobj.h
+++ b/binutils-2.22/gold/dynobj.h
@@ -208,9 +208,19 @@ class Sized_dynobj : public Dynobj
// Return a view of the contents of a section. Set *PLEN to the
// size.
- Object::Location
- do_section_contents(unsigned int shndx)
- { return this->elf_file_.section_contents(shndx); }
+ const unsigned char*
+ do_section_contents(unsigned int shndx, section_size_type* plen,
+ bool cache)
+ {
+ Location loc(this->elf_file_.section_contents(shndx));
+ *plen = convert_to_section_size_type(loc.data_size);
+ if (*plen == 0)
+ {
+ static const unsigned char empty[1] = { '\0' };
+ return empty;
+ }
+ return this->get_view(loc.file_offset, *plen, true, cache);
+ }
// Return section flags.
uint64_t