aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-05-17 14:39:18 +0000
committerNick Clifton <nickc@redhat.com>2005-05-17 14:39:18 +0000
commit10dbd1f36ff09930711bb15c30a5554439a07a40 (patch)
tree4c5b72e9d9362d222236afa71eb76760defe57ff /ld
parent3b83e13a450c5ecc419369bf0e413a895cb52608 (diff)
downloadgdb-10dbd1f36ff09930711bb15c30a5554439a07a40.zip
gdb-10dbd1f36ff09930711bb15c30a5554439a07a40.tar.gz
gdb-10dbd1f36ff09930711bb15c30a5554439a07a40.tar.bz2
ldlang.c (print_assignment): Do not rely upon a valid result having a section
associated with it. elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle the situation where a symbols's section is not known but a section relative R_ARM_RELATIVE reloc has to be generated for the Symbian OS.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/ldlang.c10
2 files changed, 13 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 342b939..27654cb 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2005-05-17 Julian Brown <julian@codesourcery.com>
+
+ * ldlang.c (print_assignment): Do not rely upon a valid result
+ having a section associated with it.
+
2005-05-17 Nick Clifton <nickc@redhat.com>
* ldlang.c (Scan_for_self_assignment): Check an assignment tree to
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 19b986a..ee85422 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -3219,7 +3219,10 @@ print_assignment (lang_assignment_statement_type *assignment,
if (computation_is_valid)
{
- value = result.value + result.section->bfd_section->vma;
+ value = result.value;
+
+ if (result.section)
+ value += result.section->bfd_section->vma;
minfo ("0x%V", value);
if (is_dot)
@@ -3233,7 +3236,10 @@ print_assignment (lang_assignment_statement_type *assignment,
FALSE, FALSE, TRUE);
if (h)
{
- value = h->u.def.value + result.section->bfd_section->vma;
+ value = h->u.def.value;
+
+ if (result.section)
+ value += result.section->bfd_section->vma;
minfo ("[0x%V]", value);
}