aboutsummaryrefslogtreecommitdiff
path: root/gold/object.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-02-07 01:51:25 +0000
committerIan Lance Taylor <iant@google.com>2008-02-07 01:51:25 +0000
commit88dd47ac00ee5a932bca9abbd2245c429dfd8f5b (patch)
tree494b3493adc0f1449c5a33f48002692a9e74ab17 /gold/object.cc
parent2e444beaa07a2428b6409225840ce12d437d7805 (diff)
downloadgdb-88dd47ac00ee5a932bca9abbd2245c429dfd8f5b.zip
gdb-88dd47ac00ee5a932bca9abbd2245c429dfd8f5b.tar.gz
gdb-88dd47ac00ee5a932bca9abbd2245c429dfd8f5b.tar.bz2
Implement --just-symbols, including -R FILE. Fix symbol values when
doing a relocatable link.
Diffstat (limited to 'gold/object.cc')
-rw-r--r--gold/object.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/gold/object.cc b/gold/object.cc
index f82827c..1adb851 100644
--- a/gold/object.cc
+++ b/gold/object.cc
@@ -574,6 +574,17 @@ Sized_relobj<size, big_endian>::do_layout(Symbol_table* symtab,
std::vector<Map_to_output>& map_sections(this->map_to_output());
map_sections.resize(shnum);
+ // If we are only linking for symbols, then there is nothing else to
+ // do here.
+ if (this->input_file()->just_symbols())
+ {
+ delete sd->section_headers;
+ sd->section_headers = NULL;
+ delete sd->section_names;
+ sd->section_names = NULL;
+ return;
+ }
+
// Whether we've seen a .note.GNU-stack section.
bool seen_gnu_stack = false;
// The flags of a .note.GNU-stack section.