|
From: | hjl.tools at gmail dot com |
Subject: | [Bug ld/23201] New: Unnecessary dynamic relocations for HIDDEN/PROVIDE_HIDDEN symbols |
Date: | Fri, 18 May 2018 13:31:15 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=23201 Bug ID: 23201 Summary: Unnecessary dynamic relocations for HIDDEN/PROVIDE_HIDDEN symbols Product: binutils Version: 2.31 (HEAD) Status: NEW Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: hjl.tools at gmail dot com Target Milestone: --- address@hidden hidden-6]$ cat x.t EXTERN(_start) ENTRY(_start) SECTIONS { .text : { HIDDEN (__hidden_sym = .); *(.text*) } } address@hidden hidden-6]$ cat x.c extern int __hidden_sym; int *foo(void) { return &__hidden_sym; } address@hidden hidden-6]$ make LD=ld gcc -B./ -O2 -g -fpic -c -o x.o x.c ld -shared -o libx.so x.o -Tx.t readelf -r libx.so Relocation section '.rela.dyn' at offset 0x10b0 contains 1 entry: Offset Info Type Sym. Value Sym. Name + Addend 0000000001b8 000000000008 R_X86_64_RELATIVE 0 address@hidden hidden-6]$ We should get address@hidden hidden-6]$ readelf -r libx.so There are no relocations in this file. address@hidden hidden-6]$ -- You are receiving this mail because: You are on the CC list for the bug.
[Prev in Thread] | Current Thread | [Next in Thread] |