Re: riscv64 -mcmodel=medany relocation truncated to fit: R_RISCV_PCREL_HI20 against symbol ...

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

 



On Wed, 2025-07-23 at 08:33 +0200, Zdenek Sojka wrote:
> Hello,
> 
> ---------- Původní e-mail ----------
> Od: Xi Ruoyao <xry111@xxxxxxxxxxx>
> Komu: Zdenek Sojka <zsojka@xxxxxxxxx>, Jeff Law
> <jeffreyalaw@xxxxxxxxx>
> Kopie: gcc-help@xxxxxxxxxxx
> Datum: 23. 7. 2025 8:26:16
> Předmět: Re: riscv64 -mcmodel=medany relocation truncated to fit:
> R_RISCV_PCREL_HI20 against symbol ...
> 
> > On Wed, 2025-07-23 at 07:47 +0200, Zdenek Sojka via Gcc-help wrote:
> > > Hello Jeff,
> > > 
> > > thank you for the answer!
> > > 
> > > 
> > > ---------- Původní e-mail ----------
> > > Od: Jeff Law <jeffreyalaw@xxxxxxxxx>
> > > Komu: Zdenek Sojka <zsojka@xxxxxxxxx>, gcc-help@xxxxxxxxxxx
> > > Datum: 23. 7. 2025 6:35:53
> > > Předmět: Re: riscv64 -mcmodel=medany relocation truncated to fit:
> > >  R_RISCV_PCREL_HI20 against symbol ...
> > > 
> > > 
> > > > On 7/22/25 3:58 AM, Zdenek Sojka via Gcc-help wrote:
> > > > > Hello,
> > > > > 
> > > > > I am facing an issue during linking when building code for
> > > > > riscv64
> > > > > with gcc-15:
> > > > > 
> > > > > 
> > > > > $ cat al.c
> > > > > int a[1];
> > > > > 
> > > > > __UINTPTR_TYPE__ foo(void)
> > > > > {
> > > > >          return (__UINTPTR_TYPE__)a + 0x7fffffff;
> > > > > 

/* snip */

> > 
> > https://gcc.gnu.org/PR91420
> 
> thank you for the link, but that code is not a valid C:
> 
> &"x"[2147483647] does not yield a valid pointer

The underlying issue is same.  Thus why what issue is set to "NEW"
(meaning the GCC developers agree it's a bug) instead of "INVALID."


-- 
Xi Ruoyao <xry111@xxxxxxxxxxx>




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux