1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-21 11:13:30 +00:00
freebsd/contrib/binutils
Andriy Gapon 517d9fc653 binutils/ld: fix incorrect placement of __start_SECNAME in some cases
__start_SECNAME and __stop_SECNAME symbols are automatically generated
by ld for orphan sections, i.e. those not explicitely referenced by a
linker script.  The symbols are supposed to be placed correspondingly
at the start and the end of the section in output file.  In some cases
__start_SECNAME may be placed at the address after the end of the
previous section (if any) and before the start the section.  This
happens when following conditions are met:
1. the orphan section is found in more than one input file
2. the orphan section has different alignment requirements across input
files
3. the first instance of the section encountered doesn't have the
greatest alignment requirement
In these conditions resulting output section will be placed at address
after the end of the previous section aligned to the greatest alignment
requirement in the inputs, but __start_SECNAME will be placed at address
after the end of the previous section aligned to the alignment
requirement of the first input in which the section is encountered.

See commit message of r196118 for a concrete example of problems caused
by this bug.

The fix is to place __start_SECNAME inside the section and use ABSOLUTE
directive, rather than placing __start_SECNAME outside the section and
trying to guess address alignment.

This fix is in line with upstream binutils change/fix made between
versions 2.19 and 2.20 in revision of 1.307 ldlang.c.

MFC after:	3 weeks
2010-07-19 18:20:44 +00:00
..
bfd Teach our toolchain how to generate 64-bit PowerPC binaries. This fixes 2010-07-10 02:29:22 +00:00
binutils readelf.1: remove duplicate -u/--unwind option description 2010-06-22 07:31:05 +00:00
config
contrib
etc
gas Add/improve mips64r2, Octeon, n32 and n64 support in the toolchain. 2010-06-02 11:06:03 +00:00
gprof Import of Binutils from the FSF 2.15 branch (just post-.0 release). 2008-05-29 02:29:59 +00:00
include Add/improve mips64r2, Octeon, n32 and n64 support in the toolchain. 2010-06-02 11:06:03 +00:00
ld binutils/ld: fix incorrect placement of __start_SECNAME in some cases 2010-07-19 18:20:44 +00:00
libiberty This commit was generated by cvs2svn to compensate for changes in r175790, 2008-01-29 16:12:06 +00:00
opcodes Add/improve mips64r2, Octeon, n32 and n64 support in the toolchain. 2010-06-02 11:06:03 +00:00
ChangeLog
config-ml.in
config.guess
config.if
config.sub
configure
configure.in
FREEBSD-deletelist
FREEBSD-upgrade
FREEBSD-Xlist
install-sh
libtool.m4
ltcf-c.sh
ltcf-cxx.sh
ltcf-gcj.sh
ltconfig
ltmain.sh
MAINTAINERS
Makefile.def
Makefile.in
Makefile.tpl
md5.sum
missing
mkinstalldirs
move-if-change
README
README-maintainer-mode
symlink-tree
ylwrap

		   README for GNU development tools

This directory contains various GNU compilers, assemblers, linkers, 
debuggers, etc., plus their support routines, definitions, and documentation.

If you are receiving this as part of a GDB release, see the file gdb/README.
If with a binutils release, see binutils/README;  if with a libg++ release,
see libg++/README, etc.  That'll give you info about this
package -- supported targets, how to use it, how to report bugs, etc.

It is now possible to automatically configure and build a variety of
tools with one command.  To build all of the tools contained herein,
run the ``configure'' script here, e.g.:

	./configure 
	make

To install them (by default in /usr/local/bin, /usr/local/lib, etc),
then do:
	make install

(If the configure script can't determine your type of computer, give it
the name as an argument, for instance ``./configure sun4''.  You can
use the script ``config.sub'' to test whether a name is recognized; if
it is, config.sub translates it to a triplet specifying CPU, vendor,
and OS.)

If you have more than one compiler on your system, it is often best to
explicitly set CC in the environment before running configure, and to
also set CC when running make.  For example (assuming sh/bash/ksh):

	CC=gcc ./configure
	make

A similar example using csh:

	setenv CC gcc
	./configure
	make

Much of the code and documentation enclosed is copyright by
the Free Software Foundation, Inc.  See the file COPYING or
COPYING.LIB in the various directories, for a description of the
GNU General Public License terms under which you can copy the files.

REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info
on where and how to report problems.