aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2009-03-17 20:36:30 +0000
committerPaul Pluzhnikov <ppluzhnikov@google.com>2009-03-17 20:36:30 +0000
commitef4ab7a8185e12b2a2e76982a9fe82c8d0f10a38 (patch)
tree2d2e5e57ad4523880f8a2baa678c40989cbec5b2 /gold
parent54a0b537b8b8ebf14fe9cb3fc82e1ae090d5d6bb (diff)
downloadgdb-ef4ab7a8185e12b2a2e76982a9fe82c8d0f10a38.zip
gdb-ef4ab7a8185e12b2a2e76982a9fe82c8d0f10a38.tar.gz
gdb-ef4ab7a8185e12b2a2e76982a9fe82c8d0f10a38.tar.bz2
2009-03-17 Paul Pluzhnikov <ppluzhnikov@google.com>
* layout.h (Layout::create_note): Add section_name parameter. * layout.cc (Layout::create_note): Likewise. (Layout::create_build_id, Layout::create_gold_note): Fix callers.
Diffstat (limited to 'gold')
-rw-r--r--gold/ChangeLog6
-rw-r--r--gold/layout.cc11
-rw-r--r--gold/layout.h8
3 files changed, 17 insertions, 8 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 9425ea6..501aabe 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,9 @@
+2009-03-17 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ * layout.h (Layout::create_note): Add section_name parameter.
+ * layout.cc (Layout::create_note): Likewise.
+ (Layout::create_build_id, Layout::create_gold_note): Fix callers.
+
2009-03-17 Ian Lance Taylor <iant@google.com>
* descriptors.cc: Include "options.h".
diff --git a/gold/layout.cc b/gold/layout.cc
index df74df3..b59caea 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -1327,7 +1327,8 @@ Layout::finalize(const Input_objects* input_objects, Symbol_table* symtab,
// *TRAILING_PADDING to the number of trailing zero bytes required.
Output_section*
-Layout::create_note(const char* name, int note_type, size_t descsz,
+Layout::create_note(const char* name, int note_type,
+ const char* section_name, size_t descsz,
bool allocate, size_t* trailing_padding)
{
// Authorities all agree that the values in a .note field should
@@ -1394,7 +1395,7 @@ Layout::create_note(const char* name, int note_type, size_t descsz,
memcpy(buffer + 3 * (size / 8), name, namesz);
- const char* note_name = this->namepool_.add(".note", false, NULL);
+ const char *note_name = this->namepool_.add(section_name, false, NULL);
elfcpp::Elf_Xword flags = 0;
if (allocate)
flags = elfcpp::SHF_ALLOC;
@@ -1424,7 +1425,8 @@ Layout::create_gold_note()
size_t trailing_padding;
Output_section *os = this->create_note("GNU", elfcpp::NT_GNU_GOLD_VERSION,
- desc.size(), false, &trailing_padding);
+ ".note.gnu.gold-version", desc.size(),
+ false, &trailing_padding);
Output_section_data* posd = new Output_data_const(desc, 4);
os->add_output_section_data(posd);
@@ -1556,7 +1558,8 @@ Layout::create_build_id()
// Create the note.
size_t trailing_padding;
Output_section* os = this->create_note("GNU", elfcpp::NT_GNU_BUILD_ID,
- descsz, true, &trailing_padding);
+ ".note.gnu.build-id", descsz, true,
+ &trailing_padding);
if (!desc.empty())
{
diff --git a/gold/layout.h b/gold/layout.h
index ca0f89a..010ab2e 100644
--- a/gold/layout.h
+++ b/gold/layout.h
@@ -456,12 +456,12 @@ class Layout
};
typedef std::vector<Group_signature> Group_signatures;
- // Create a .note section, filling in the header.
+ // Create a note section, filling in the header.
Output_section*
- create_note(const char* name, int note_type, size_t descsz,
- bool allocate, size_t* trailing_padding);
+ create_note(const char* name, int note_type, const char *section_name,
+ size_t descsz, bool allocate, size_t* trailing_padding);
- // Create a .note section for gold.
+ // Create a note section for gold version.
void
create_gold_note();