bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/11133] Static linking with gc-sections deletes sections wi


From: hjl dot tools at gmail dot com
Subject: [Bug binutils/11133] Static linking with gc-sections deletes sections with __start/__stop reference
Date: 5 Jan 2010 16:43:24 -0000

------- Additional Comments From hjl dot tools at gmail dot com  2010-01-05 
16:43 -------
A smaller testcase:

---
address@hidden pr11133]$ cat test.c
extern const int *__start__foo;
int foo __attribute__((__section__("_foo"))) = 1;
int
_start ()
{
  return *__start__foo;
}
address@hidden pr11133]$ make
cc    -c -o test.o test.c
./ld -e _start -o bar test.o
./ld -e _start --gc-sections -o foo test.o
test.o: In function `_start':
test.c:(.text+0x7): undefined reference to `__start__foo'
make: *** [foo] Error 1
address@hidden pr11133]$ 
---

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Static linking with gc-     |Static linking with gc-
                   |sections deletes            |sections deletes sections
                   |__libc_atexit causing       |with __start/__stop
                   |problems with stdio buffer  |reference
                   |flush to file.              |


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]