http://sourceware.org/bugzilla/show_bug.cgi?id=12763

--- Comment #3 from Marcus Comstedt <marcus at mc dot pp.se> 2011-05-18 
16:56:24 UTC ---
@Nick:
Thank you for looking at this.  My test case is the following program:

static __thread char baz=17;
static __thread char foo[1024] __attribute__((aligned(1024)));
int main() { return 0; }

Compiling this (without optimization) yields:

Sections:
Idx Name          Size      VMA               LMA               File off  Algn
[...]
 17 .tdata        00000001  0000000000032000  0000000000032000  00022000  2**10
                  CONTENTS, ALLOC, LOAD, DATA, THREAD_LOCAL
 18 .tbss         00000b80  0000000000032400  0000000000032400  00022001  2**10
                  ALLOC, THREAD_LOCAL
[...]

and

Program Header:
[...]
    LOAD off    0x0000000000020000 vaddr 0x0000000000030000 paddr
0x0000000000030000 align 2**16
         filesz 0x0000000000002001 memsz 0x0000000000002001 flags rw-
[...]

ld complains because 32400 > 30000+2001.

@Alan:
Indeed it will allow that.  And that would be a problem... why exactly?
.tbss is never loaded in the traditional sense; since it has no loading
requirements its loading requirements (none) are fulfilled by any and all
PT_LOAD segments, and so it is "in" them in the same way that the empty set is
a subset of any set.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to