bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/26757] Cross and Native GDB Fails to Build on Cygwin


From: tnfchris at sourceware dot org
Subject: [Bug ld/26757] Cross and Native GDB Fails to Build on Cygwin
Date: Fri, 08 Oct 2021 21:20:50 +0000

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

--- Comment #9 from Tamar Christina <tnfchris at sourceware dot org> ---
(In reply to sourceware-bugzilla from comment #8)
> 
>    0x00007ffb2ba04818 <+24>:    lea    -0x60f1481f(%rip),%rax        #
> 0x7ffacaaf0000
>    0x00007ffb2ba0481f <+31>:    test   %rax,%rax
>    0x00007ffb2ba04822 <+34>:    je     0x7ffb2ba04829
>    0x00007ffb2ba04824 <+36>:    call   0x7ffacaaf0000
> 
> So the fact that the compiler decided to use lea in its if(<symbol>) check
> means it was subject to the same range limitations as the call, and
> therefore can never evaluate 0.

Hmmm that's very unfortunate.. I don't remember off the top of my head at the
moment, but I don't believe you can have a weak undef __declspec(dllimport) can
you?

If not, we could fix this by relaxing the instruction from lea to e.g. a xor
%rax, %rax during relocation processing if the symbol is still weak and undef.


in the meantime, you can get the build to work by specifying a low
`--image-base` in LDFLAGS.

-- 
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]