diff options
author | Hans-Peter Nilsson <hp@bitrange.com> | 2020-04-01 04:03:46 +0200 |
---|---|---|
committer | Hans-Peter Nilsson <hp@bitrange.com> | 2020-04-01 04:03:46 +0200 |
commit | 7b948a2580d34e7e93bef0527ca853e22515dec4 (patch) | |
tree | 7e880c1a825c9c4172eee617ebee9470796efcda /bfd/ChangeLog | |
parent | 283b7aa1343c29d9c0cdee6312da3d5a61a03f15 (diff) | |
download | gdb-7b948a2580d34e7e93bef0527ca853e22515dec4.zip gdb-7b948a2580d34e7e93bef0527ca853e22515dec4.tar.gz gdb-7b948a2580d34e7e93bef0527ca853e22515dec4.tar.bz2 |
mmo.c: Fix ld testsuite regression "objcopy executable (pr25662)".
* mmo.c (mmo_scan): Create .text section only when needed, not
from the start.
For the test-case at hand, the .data section is created and output
first by the linker, but the mmo input-reader mmo_scan always creates
a .text section. Since sections are output in the order in which
they're created, it's output first, breaking the assumption that
obcopy without options (or with -p) creates output identical to its
input. The point of creating it at the top of mmo_scan is a trivial
default assignment for the current section variable "sec". Instead we
now defer the default, creating it only when needed and sec is NULL.
Diffstat (limited to 'bfd/ChangeLog')
-rw-r--r-- | bfd/ChangeLog | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 4c2bb14..d11421f 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2020-04-01 Hans-Peter Nilsson <hp@bitrange.com> + + * mmo.c (mmo_scan): Create .text section only when needed, not + from the start. + 2020-03-31 Alan Modra <amodra@gmail.com> * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Correct bfd_bread |