aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2009-06-24 05:09:11 +0000
committerIan Lance Taylor <ian@airs.com>2009-06-24 05:09:11 +0000
commitec3f783efde154039bcf29fca808e70d523953d4 (patch)
tree75d6995092bcc505525fa5e94c8769a2a6ecf874 /gold
parent459c9f1c5f4e19a4fdf39ccd9289f0fde532a21b (diff)
downloadgdb-ec3f783efde154039bcf29fca808e70d523953d4.zip
gdb-ec3f783efde154039bcf29fca808e70d523953d4.tar.gz
gdb-ec3f783efde154039bcf29fca808e70d523953d4.tar.bz2
PR 10156
* layout.cc (Layout::create_note): Use choose_output_section rather than make_output_section.
Diffstat (limited to 'gold')
-rw-r--r--gold/ChangeLog6
-rw-r--r--gold/layout.cc16
2 files changed, 14 insertions, 8 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 5507317..debf933 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,5 +1,11 @@
2009-06-23 Ian Lance Taylor <iant@google.com>
+ PR 10156
+ * layout.cc (Layout::create_note): Use choose_output_section
+ rather than make_output_section.
+
+2009-06-23 Ian Lance Taylor <iant@google.com>
+
PR 10237
* options.cc (General_options::parse_V): Set printed_version_.
(General_options::General_options): Initialize printed_version_.
diff --git a/gold/layout.cc b/gold/layout.cc
index 8dba501..4014ec0 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -1361,10 +1361,11 @@ Layout::finalize(const Input_objects* input_objects, Symbol_table* symtab,
}
// Create a note header following the format defined in the ELF ABI.
-// NAME is the name, NOTE_TYPE is the type, DESCSZ is the size of the
-// descriptor. ALLOCATE is true if the section should be allocated in
-// memory. This returns the new note section. It sets
-// *TRAILING_PADDING to the number of trailing zero bytes required.
+// NAME is the name, NOTE_TYPE is the type, SECTION_NAME is the name
+// of the section to create, DESCSZ is the size of the descriptor.
+// ALLOCATE is true if the section should be allocated in memory.
+// This returns the new note section. It sets *TRAILING_PADDING to
+// the number of trailing zero bytes required.
Output_section*
Layout::create_note(const char* name, int note_type,
@@ -1435,13 +1436,12 @@ Layout::create_note(const char* name, int note_type,
memcpy(buffer + 3 * (size / 8), name, namesz);
- const char *note_name = this->namepool_.add(section_name, false, NULL);
elfcpp::Elf_Xword flags = 0;
if (allocate)
flags = elfcpp::SHF_ALLOC;
- Output_section* os = this->make_output_section(note_name,
- elfcpp::SHT_NOTE,
- flags);
+ Output_section* os = this->choose_output_section(NULL, section_name,
+ elfcpp::SHT_NOTE,
+ flags, false);
Output_section_data* posd = new Output_data_const_buffer(buffer, notehdrsz,
size / 8,
"** note header");