bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/32112] New: Weak undefined doesn't work


From: hjl.tools at gmail dot com
Subject: [Bug gold/32112] New: Weak undefined doesn't work
Date: Thu, 22 Aug 2024 15:57:27 +0000

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

            Bug ID: 32112
           Summary: Weak undefined doesn't work
           Product: binutils
           Version: 2.44 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
          Assignee: ccoutant at gmail dot com
          Reporter: hjl.tools at gmail dot com
                CC: ian at airs dot com
  Target Milestone: ---
            Target: aarch64

On aarch64, there is

FAIL: weak_undef_test

[hjl@gnu-cfl-3 gold-2-cross]$ cat x.c
extern void undefined (void) __attribute__((weak));

int
main (void)
{
  if (&undefined != 0)
    __builtin_abort ();

  return 0;
}
[hjl@gnu-cfl-3 gold-2-cross]$ make
/export/project/tools-build/glibc-many/install/compilers/aarch64-linux-gnu/bin/aarch64-glibc-linux-gnu-gcc
-B./ -O2 -g   -c -o x.o x.c
/export/project/tools-build/glibc-many/install/compilers/aarch64-linux-gnu/bin/aarch64-glibc-linux-gnu-gcc
-B./  -o x x.o
readelf -srW x | grep undefined
000000000041ffe0  0000000300000401 R_AARCH64_GLOB_DAT     0000000000000000
undefined + 0
     3: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND undefined
    48: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND undefined
[hjl@gnu-cfl-3 gold-2-cross]$

There should be no relocation against undefined.

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