On Wed, 11 Jul 2007 12:04:34 -0700 (PDT) Roland McGrath <roland@frob.com> wrote:I'm curios to know what happens if nobody defines __start_notes and __end_notes. We'll use the extern-attribute-weak thing, but those two locations won't even get instantiated in vmlinux, I think. And the code relies upon the difference between two non-existent attribute-weak locations being zero. akpm:/home/akpm> cat t.c #include <stdio.h> extern const char __start_notes __attribute__((weak)); extern const char __stop_notes __attribute__((weak)); main() { int a = &__stop_notes - &__start_notes; printf("%d\n", a); } akpm:/home/akpm> gcc -g t.c akpm:/home/akpm> ./a.out 0 akpm:/home/akpm> nm a.out|grep notes w __start_notes w __stop_notes So it all works OK on this toolchain. But is it _supposed_ to work? Are we venturing into unexplored binutils territory here? -
| Al Boldi | Re: [ck] Re: [ANNOUNCE] RSDL completely fair starvation free interactive cpu sched... |
| Ingo Molnar | Re: [patch] sched_clock(): cleanups |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Amit K. Arora | [RFC] Heads up on sys_fallocate() |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 18/37] dccp: Support for Mandatory options |
| Denys Vlasenko | [PATCH 1/2] bnx2: factor out gzip unpacker |
