Skip to content
Commit 7b948a25 authored by Hans-Peter Nilsson's avatar Hans-Peter Nilsson
Browse files

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.
parent 283b7aa1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment