[Top][All Lists]

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

[Bug ld/13600] New: protected visibility creates bogus relocation

From: rguenth at gcc dot gnu.org
Subject: [Bug ld/13600] New: protected visibility creates bogus relocation
Date: Tue, 17 Jan 2012 12:32:11 +0000


             Bug #: 13600
           Summary: protected visibility creates bogus relocation
           Product: binutils
           Version: 2.22
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: address@hidden
        ReportedBy: address@hidden
    Classification: Unclassified

.file   "t1.c"
        .globl  foo
        .protected      foo
        .type   foo, @function
        pushq   %rbp
        .cfi_def_cfa_offset 16
        .cfi_offset 6, -16
        movq    %rsp, %rbp
        .cfi_def_cfa_register 6
        leaq    foo(%rip), %rax
        popq    %rbp
        .cfi_def_cfa 7, 8
        .size   foo, .-foo
        .ident  "GCC: (GNU) 4.7.0 20120116 (experimental)"
        .section        .note.GNU-stack,"",@progbits

does not link:

/tmp/cc43SbHJ.o: relocation R_X86_64_PC32 against protected symbol `foo' can
not be used when making a shared object
final link failed: Bad value
collect2: error: ld returned 1 exit status

C testcase:

__attribute__((visibility("protected"))) void * foo (void) { return (void
*)foo; }

gcc t1.c -o libt1.so -shared -fPIC.

Sounds similar to PR584, but this time with a self-reference.

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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]