https://sourceware.org/bugzilla/show_bug.cgi?id=29377
            Bug ID: 29377
           Summary: non-canonical reference to canonical protected
                    function
           Product: binutils
           Version: 2.40 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---
            Target: i386,x86-64

[hjl@gnu-tgl-3 protected]$ cat foo.c
__attribute__ ((visibility ("protected")))
void
foo (void)
{
}
[hjl@gnu-tgl-3 protected]$ cat main.c
extern void foo (void);

void (*foo_p) (void);

int
main ()
{
  foo_p = foo;
  return 0;
}
[hjl@gnu-tgl-3 protected]$ gcc -mno-direct-extern-access foo.c main.c
/usr/local/bin/ld: /tmp/cc4BdqMu.o: non-canonical reference to canonical
protected function `foo' in /tmp/ccx682Zd.o
/usr/local/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
[hjl@gnu-tgl-3 protected]$

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

Reply via email to