The binutils update in r218822 caused the MIPS n64 dynamic binaries to
fail because the ".interp" section is not in the initial sections.
This happens because elf64bmip-defs.sh overrides INITIAL_READONLY_SECTIONS
to add ".MIPS.options" sections instead of the ".reginfo" section used
by n32.
This used to work fine, but after r218822, INITIAL_READONLY_SECTIONS also
contains the .interp section, so the override has to be done differently.
Reported by : aduane at juniper
Obtained from: gonzo (Initial version)
x86 CPU support, better support for powerpc64, some new directives, and
many other things. Bump __FreeBSD_version, and add a note to UPDATING.
Thanks to the many people that have helped to test this.
Obtained from: projects/binutils-2.17
'linker stubs'. Add .note.GNU-stack for the stubs objects. Without this,
final binary will have RWE mode for PT_GNU_STACK regardless of the
actual requirements.
Tested by: nwhitehorn
Reviewed by: dim, nwhitehorn
us up to version 2.17.50.20070703, at the last GPLv2 commit.
Amongst others, this added upstream support for some FreeBSD-specific
things that we previously had to manually hack in, such as the OSABI
label support, and so on.
There are also quite a number of new files, some for cpu's (e.g. SPU)
that we may or may not be interested in, but those can be cleaned up
later on, if needed.
(still under GPLv2 at that time):
Author: H.J. Lu <hjl@lucon.org>
Date: Wed Sep 27 04:18:16 2006 +0000
PR ld/3223
PR ld/3267
* bfd/elf.c (assign_file_positions_for_non_load_sections): Don't warn
zero size allocated sections.
* ld/ldlang.h (lang_output_section_statement_type): Add
section_relative_symbol.
* ld/ldlang.c (strip_excluded_output_sections): Don't strip a section
with a symbol relative to it.
(lang_size_sections_1): Mark if an output section has a symbol symbol
relative to it.
This prevents warnings like the following during stripping of debug info
from kernel modules on i386:
===> zlib (all)
...
objcopy --only-keep-debug zlib.ko.debug zlib.ko.symbols
objcopy --strip-debug --add-gnu-debuglink=zlib.ko.symbols zlib.ko.debug zlib.ko
BFD: zlib.ko: warning: allocated section `.plt' not in segment
BFD: zlib.ko: warning: allocated section `.got' not in segment
(still under GPLv2 at that time):
Author: Nick Clifton <nickc@redhat.com>
Date: Thu Aug 24 14:59:24 2006 +0000
* ldlang.c (lang_size_sections_1, lang_assignment_statement_enum):
Adjust the current address of DEFAULT_MEMORY_REGION even when dot
hasn't changed.
This is a prerequisite for the fix coming just after this.
moved from ld/emultempl/elf32.em to ld/ldlang.c, so apply approximately
the same change as upstream, which has description:
* ldlang.c (lang_insert_orphan): Add __start_<section> symbol assignment
inside output section statement. Ensure only one set of symbols per
output section.
* emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Add non-dollar
sections before dollar sections. Correct add_child list insertion.
Taken from upstream git commit 7e01d69a19a8fd079887f26853c8565da15ff340,
with permission to use it under GPLv2 from the author.
The change made to bfd/elf.c in upstream revision 1.217.4.3 (which was a
revert of an earlier change), caused objcopy on powerpc to fail to copy
debug info from kernel modules. This had to be fixed by applying the
diff from upstream revision 1.243 on top of it.
__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
a variety of bugs in binutils related to handling of 64-bit PPC ELF,
provides a GCC configuration for 64-bit PowerPC on FreeBSD, and
associated build systems tweaks.
Obtained from: projects/ppc64
Binutils has a "contrib" subdirectory - thus flattening cannot happen
without renaming the upper level contrib directory in a first pass.
Also, don't record this move and remove any keyword expansion.