binutils221: final solution to start/stop label generation
authorJohn Marino <draco@marino.st>
Thu, 7 Apr 2011 22:14:07 +0000 (00:14 +0200)
committerJohn Marino <draco@marino.st>
Thu, 7 Apr 2011 22:14:07 +0000 (00:14 +0200)
commitc358eb24ed69d493089dc69ed5b81a7d5f804fa1
tree2a5b480d75de422e39b484bdcf6988e9d41f3625
parentd63ed24bcb7b9c0549c56ca5cb07632d1fece7c4
binutils221: final solution to start/stop label generation

During discussion on binutils mail list about preserving the
__start_* and __stop_* section labels, Dimitry Andric indicated that
FreeBSD had the same exact issue when they recently upgraded to
binutils 2.17.50.  The solution they chose was to declare these section
labels as global symbols, and the stock version of ld will retain them.

This commit implements the FreeBSD solution.  Besides the obvious
benefit of having minimalist shared objects, it also "fixes" binutils
2.20 which, until this commit, failed to generate the start/stop section
labels.

Commit f070647cc5317c4924be4dd60563fc39c18094cf has been reverted to
convert binutils 2.21 to a completely stock ld.  Some whitespace cleanup
of linker_set.h was done while modifying __MAKE_SET macro.
contrib/binutils-2.21/README.DRAGONFLY
contrib/binutils-2.21/ld/ldlang.c
sys/sys/cdefs.h
sys/sys/linker_set.h
usr.sbin/mfiutil/mfiutil.h