aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-04-19 07:35:12 +0000
committerJakub Jelinek <jakub@redhat.com>2004-04-19 07:35:12 +0000
commit3737f867aca299a513aaa99cc87df33ace2c0bf9 (patch)
tree9438c042bd621b8e9b728e9a45d6aed9158be195 /ld/ldlang.c
parentbef5cbecf30620c7b91b41b713242994ab16553e (diff)
downloadgdb-3737f867aca299a513aaa99cc87df33ace2c0bf9.zip
gdb-3737f867aca299a513aaa99cc87df33ace2c0bf9.tar.gz
gdb-3737f867aca299a513aaa99cc87df33ace2c0bf9.tar.bz2
* ldlang.c (lang_do_assignments_1): Handle .tbss output section
specially.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 0c08601..6460c32 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -3350,9 +3350,11 @@ lang_do_assignments_1
{
dot = os->bfd_section->vma;
lang_do_assignments_1 (os->children.head, os, os->fill, dot);
- dot = (os->bfd_section->vma
- + TO_ADDR (os->bfd_section->_raw_size));
-
+ /* .tbss sections effectively have zero size. */
+ if ((os->bfd_section->flags & SEC_HAS_CONTENTS) != 0
+ || (os->bfd_section->flags & SEC_THREAD_LOCAL) == 0
+ || link_info.relocatable)
+ dot += TO_ADDR (os->bfd_section->_raw_size);
}
if (os->load_base)
{