[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/12763] [PATCH] Incorrect error when .tbss starts outside PT_LOAD
From: |
marcus at mc dot pp.se |
Subject: |
[Bug ld/12763] [PATCH] Incorrect error when .tbss starts outside PT_LOAD segment |
Date: |
Wed, 18 May 2011 16:56:31 +0000 |
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 ld/12763] New: [PATCH] Incorrect error when .tbss starts outside PT_LOAD segment, marcus at mc dot pp.se, 2011/05/15
- [Bug ld/12763] [PATCH] Incorrect error when .tbss starts outside PT_LOAD segment, nickc at redhat dot com, 2011/05/18
- [Bug ld/12763] [PATCH] Incorrect error when .tbss starts outside PT_LOAD segment, amodra at gmail dot com, 2011/05/18
- [Bug ld/12763] [PATCH] Incorrect error when .tbss starts outside PT_LOAD segment,
marcus at mc dot pp.se <=
- [Bug ld/12763] [PATCH] Incorrect error when .tbss starts outside PT_LOAD segment, amodra at gmail dot com, 2011/05/18
- [Bug ld/12763] [PATCH] Incorrect error when .tbss starts outside PT_LOAD segment, amodra at gmail dot com, 2011/05/18
- [Bug ld/12763] [PATCH] Incorrect error when .tbss starts outside PT_LOAD segment, marcus at mc dot pp.se, 2011/05/19
- [Bug ld/12763] [PATCH] Incorrect error when .tbss starts outside PT_LOAD segment, hjl.tools at gmail dot com, 2011/05/19
- [Bug ld/12763] [PATCH] Incorrect error when .tbss starts outside PT_LOAD segment, marcus at mc dot pp.se, 2011/05/19
- [Bug ld/12763] [PATCH] Incorrect error when .tbss starts outside PT_LOAD segment, hjl.tools at gmail dot com, 2011/05/19
- [Bug ld/12763] [PATCH] Incorrect error when .tbss starts outside PT_LOAD segment, marcus at mc dot pp.se, 2011/05/19
- [Bug ld/12763] [PATCH] Incorrect error when .tbss starts outside PT_LOAD segment, cvs-commit at gcc dot gnu.org, 2011/05/20
- [Bug ld/12763] [PATCH] Incorrect error when .tbss starts outside PT_LOAD segment, cvs-commit at gcc dot gnu.org, 2011/05/20
- [Bug ld/12763] [PATCH] Incorrect error when .tbss starts outside PT_LOAD segment, marcus at mc dot pp.se, 2011/05/20