bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/25829] Several ld tests fail for 16-bit targets like pdp11-aout


From: casner at acm dot org
Subject: [Bug ld/25829] Several ld tests fail for 16-bit targets like pdp11-aout
Date: Tue, 21 Apr 2020 23:08:42 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=25829

--- Comment #5 from Stephen Casner <casner at acm dot org> ---
Created attachment 12486
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12486&action=edit
Additional patch for mingw and cygwin

The idiom of the tail wagging the dog comes to mind here.  I was just trying to
do a good deed to clear up the long-standing test failures for the pdp11
target.  Obviously my experience is not broad enough to realize the range of
different behaviors exhibited by the many targets supported by binutils.

(In reply to Nick Clifton from comment #4)
>   I made one small change - using a 16K region size for the 
>   text region in the memory tests as this pacified the PE
>   targets.

Using 16K is fine.  I had dropped it down to 2K to avoid the need to also
change 0+ to 0* in the regexps if nm is changed to print 4-digit hex addresses
for 16-bit targets as I'd like to do, but that regexp change would be fine.

>   (They were setting the 'tred' symbol to a value
>   of 0x100000900 - even on 32-bit targets!.  I think that 
>   this is a bug related to the image base setting, but I did
>   not have time to investigate).

So you're saying that if the address was below some threshold then the default
offset of 0x100000000 would be added, but 16K was high enough to avoid that? 
(The ld doc description of --image-base says the default for dlls is 0x10000000
(one fewer 0s), but I don't know if this link in these tests would be
considered a dll.  Also, that text says --image-base is exclusive to the i386
PE targeted port, but it sounds like that comment is out of date.)

>   I also found that 64-bit PE targets would fail the default-script
>   tests because they need the "--image-base 0" option added to 
>   the linker command line in order to work.  Since there is
>   no way to conditionally add command line options in the
>   run_dump_tests I just marked them as xfail.

I see that the default-script tests as they were before my changes here would
pass cleanly on x86_64-mingw64 but they would already fail for x86_64-cygwin
because 0x100000000 is added.  In fact, x86_64-cygwin has 23 unexpected FAILs. 
Are there many targets that don't pass the ld testsuite cleanly?

The target-specific --image-base option can be added conditionally to LDFLAGS
in default-script.exp as it already does to add --local-store for spu*-*-* so
the tests would not have to be skipped for *-*-mingw64 x86_64-*-cygwin.  I've
done that in this additional patch.  I tested x86_64-mingw64 and x86_64-cygwin.
 I hope it would not cause a failure for anything else matching *-*-mingw64
x86_64-*-cygwin.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]