[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/11133] Static linking with gc-sections deletes __libc_atex
From: |
hjl dot tools at gmail dot com |
Subject: |
[Bug binutils/11133] Static linking with gc-sections deletes __libc_atexit causing problems with stdio buffer flush to file. |
Date: |
5 Jan 2010 15:48:22 -0000 |
------- Additional Comments From hjl dot tools at gmail dot com 2010-01-05
15:48 -------
Both ld and gold fail with
---
address@hidden pr11133]$ cat test.c
struct obs_kernel_param {
long a;
long b;
int c;
};
extern struct obs_kernel_param const __start__init_setup[];
#define __setup_param(A, B, C) \
struct obs_kernel_param __setup_##A \
__attribute__((__section__("_init_setup"))) = { A, B, C }
__setup_param(0x11, 0x2, 0x3);
int
_start ()
{
return __start__init_setup != (struct obs_kernel_param *) 1;
}
address@hidden pr11133]$ make
cc -c -o test.o test.c
./ld -o bar test.o
./ld --gc-sections -o foo test.o
test.o: In function `_start':
test.c:(.text+0x5): undefined reference to `__start__init_setup'
make: *** [foo] Error 1
address@hidden pr11133]$
---
--
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.
- [Bug binutils/11133] New: Static linking with gc-sections deletes __libc_atexit causing problems with stdio buffer flush to file., tmsriram at google dot com, 2010/01/04
- [Bug binutils/11133] Static linking with gc-sections deletes __libc_atexit causing problems with stdio buffer flush to file.,
hjl dot tools at gmail dot com <=
- [Bug binutils/11133] Static linking with gc-sections deletes sections with __start/__stop reference, hjl dot tools at gmail dot com, 2010/01/05
- [Bug binutils/11133] Static linking with gc-sections deletes sections with __start/__stop reference, hjl dot tools at gmail dot com, 2010/01/05
- [Bug binutils/11133] Static linking with gc-sections deletes sections with __start/__stop reference, hjl dot tools at gmail dot com, 2010/01/05
- [Bug binutils/11133] Static linking with gc-sections deletes sections with __start/__stop reference, amodra at gmail dot com, 2010/01/06
- [Bug binutils/11133] Static linking with gc-sections deletes sections with __start/__stop reference, ian at airs dot com, 2010/01/06
- [Bug binutils/11133] gc-sections deletes sections with __start/__stop reference, hjl dot tools at gmail dot com, 2010/01/06
- [Bug binutils/11133] gc-sections deletes sections with __start/__stop reference, vapier at gentoo dot org, 2010/01/07
- [Bug binutils/11133] gc-sections deletes sections with __start/__stop reference, amodra at gmail dot com, 2010/01/07
- [Bug binutils/11133] gc-sections deletes sections with __start/__stop reference, hjl dot tools at gmail dot com, 2010/01/07
- [Bug binutils/11133] gc-sections deletes sections with __start/__stop reference, hjl dot tools at gmail dot com, 2010/01/07