[PATCH] D13760: ELF2: Implement __start_SECNAME and __stop_SECNAME.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 14 22:34:58 PDT 2015


davide added a subscriber: davide.
davide added a comment.

Rare, maybe, but definitely very useful. Definitely the FreeBSD kernel relies on __start/__stop and I think also the Linux kernel, although I wouldn't bet on that. The code looks good to me. I would also dump the symbol table to double-check the address of the symbols is the same. I also want to spend some words on this.
In the old linker we had an entire/unfinished pass taking care of __start/__stop. I know because I spent a fair amount of time trying to understand and finish the feature, without success. Now, could it be I didn't know better, but it looked overly complicated to me at the time. It's nice to see the same feature implemented (without comments) in roughly 10 lines of code.


http://reviews.llvm.org/D13760





More information about the llvm-commits mailing list