aboutsummaryrefslogtreecommitdiff
path: root/gold/merge.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-12-20 16:27:34 +0000
committerIan Lance Taylor <iant@google.com>2007-12-20 16:27:34 +0000
commit1e9836570f11422834da6ad9ccc49ce2fd121222 (patch)
treec82b87b27858bcc53e34c1a804def361e269b678 /gold/merge.h
parent63c2c2877bddc79a54ef833cf7b42f95a5f94ff6 (diff)
downloadgdb-1e9836570f11422834da6ad9ccc49ce2fd121222.zip
gdb-1e9836570f11422834da6ad9ccc49ce2fd121222.tar.gz
gdb-1e9836570f11422834da6ad9ccc49ce2fd121222.tar.bz2
Update comments about output offsets and merged input sections.
Diffstat (limited to 'gold/merge.h')
-rw-r--r--gold/merge.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/gold/merge.h b/gold/merge.h
index bf6a407..c232ab0 100644
--- a/gold/merge.h
+++ b/gold/merge.h
@@ -44,7 +44,9 @@ class Merge_map
// Add a mapping for the bytes from OFFSET to OFFSET + LENGTH in the
// input section SHNDX in object OBJECT to OUTPUT_OFFSET in the
// output section. An OUTPUT_OFFSET of -1 means that the bytes are
- // discarded.
+ // discarded. OUTPUT_OFFSET is not the offset from the start of the
+ // output section, it is the offset from the start of the merged
+ // data within the output section.
void
add_mapping(Relobj* object, unsigned int shndx,
section_offset_type offset, section_size_type length,
@@ -54,7 +56,9 @@ class Merge_map
// is at offset OFFSET in section SHNDX in OBJECT. This sets
// *OUTPUT_OFFSET to the offset in the output section; this will be
// -1 if the bytes are not being copied to the output. This returns
- // true if the mapping is known, false otherwise.
+ // true if the mapping is known, false otherwise. This returns the
+ // value stored by add_mapping, namely the offset from the start of
+ // the merged data within the output section.
bool
get_output_offset(const Relobj* object, unsigned int shndx,
section_offset_type offset,
@@ -84,7 +88,9 @@ class Output_merge_base : public Output_section_data
{ return this->entsize_; }
// Add a mapping from an OFFSET in input section SHNDX in object
- // OBJECT to an OUTPUT_OFFSET in the output section.
+ // OBJECT to an OUTPUT_OFFSET in the output section. OUTPUT_OFFSET
+ // is the offset from the start of the merged data in the output
+ // section.
void
add_mapping(Relobj* object, unsigned int shndx, section_offset_type offset,
section_size_type length, section_offset_type output_offset)