------- Additional Comments From hjl dot tools at gmail dot com  2010-01-05 
15:48 -------
Both ld and gold fail with

---
[...@gnu-6 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;
}
[...@gnu-6 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
[...@gnu-6 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 mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to