From: Jakub Jelinek Date: Mon, 19 Apr 2004 07:35:12 +0000 (+0000) Subject: * ldlang.c (lang_do_assignments_1): Handle .tbss output section X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3737f867aca299a513aaa99cc87df33ace2c0bf9;p=binutils-gdb.git * ldlang.c (lang_do_assignments_1): Handle .tbss output section specially. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index aee579a0a97..86f4b2b21a6 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2004-04-19 Jakub Jelinek + + * ldlang.c (lang_do_assignments_1): Handle .tbss output section + specially. + 2004-04-18 Danny Smith * scriptempl/pe.sc: Put numbered .ctors.* after .ctors diff --git a/ld/ldlang.c b/ld/ldlang.c index 0c086014e2a..6460c32ab6d 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) {