bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/1957] New: "protected/hidden/internal" attribute in scripts ?


From: samuel dot thibault at ens-lyon dot org
Subject: [Bug ld/1957] New: "protected/hidden/internal" attribute in scripts ?
Date: 1 Dec 2005 11:16:04 -0000

Hi,

I'm having problems with visibility attributes and ld scripts. For instance, 
the following program (test.c):

extern __attribute__((visibility("internal"))) void *__foo;
void* f(void) {
        return __foo;
}

compiled with the following script (test.lds):
SECTIONS {
        .data: {
                __foo = .;
        }
}

compiled with

gcc-4.0 test.c test.lds -o libtest.so -shared -fPIC

produces the following error:
/usr/bin/ld: /tmp/ccUpkjLi.o: relocation R_X86_64_PC32 against `__foo' can not 
be used when making a shared object; recompile with -fPIC

This happens because __foo isn't defined as being internal in the linker 
script. Is there a way to do this? (I couldn't find in the info pages).

-- 
           Summary: "protected/hidden/internal" attribute in scripts ?
           Product: binutils
           Version: 2.15
            Status: NEW
          Severity: minor
          Priority: P2
         Component: ld
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: samuel dot thibault at ens-lyon dot org
                CC: bug-binutils at gnu dot org
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=1957

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]