[PATCH] Add testcase for PR 25662 invalid sh_offset for section
Alan Modra
amodra@gmail.com
Thu Mar 26 21:25:12 GMT 2020
On Thu, Mar 26, 2020 at 11:10:36AM +0000, Jozef Lawrynowicz wrote:
> The attached patch has a testcase for PR binutils/25662, "objcopy sets invalid
> sh_offset for the first section in a no_contents segment containing program
> headers".
>
> The patch also extends the objcopy_test procedure from objcopy.exp, allowing
> either object files or linked executables to be tested.
>
> I verified that the testcase does not error for msp430-elf,
> x86_64-pc-linux-gnu, arm-eabi, ia64-vms (has no linker so the test is
> untested) and i386-pe (is not an ELF target).
>
> Note that the test fails for i386-pe, objdump -x output shows that the
> "Time/Date" field has been reset to epoch 0.
>
> Ok to apply?
OK, thanks. Yes, we are going to have some fails with this new test.
Hmm, objcopy -p doesn't help with the PE date stamp and it seems like
it should.
You might like to simplify the LD test.
> + set status [remote_exec host $LD -v]
> + if { [lindex $status 0] != 0 } {
if {[which $LD] == 0} then {
> + untested "objcopy $type ($testname)"
> + return
> + }
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list