[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/21964] __start_SCN symbols aren't exported anymore
From: |
matz at suse dot de |
Subject: |
[Bug ld/21964] __start_SCN symbols aren't exported anymore |
Date: |
Mon, 14 Aug 2017 16:56:12 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=21964
--- Comment #4 from Michael Matz <matz at suse dot de> ---
Created attachment 10353
--> https://sourceware.org/bugzilla/attachment.cgi?id=10353&action=edit
Tentative patch
Well, the problem is quite obvious. Just compile this:
% cat t.c
#include <assert.h>
extern void * __start___verbose, * __stop___verbose;
int foo(void)
{
static int my_var __attribute__((section("__verbose"))) = 5;
if (__start___verbose == __stop___verbose) assert(0);
if (my_var == 5) return 0;
else return -1;
}
% gcc -c -fPIC t.c
% ./ld/ld-new -shared t.o
% readelf -rsW a.out
...
It should have __start___verbose in the dynamic symbols but hasn't.
FWIW, I've come up with this patch. The idea is to make the symbols protected
and always resolve them locally even if the (completely broken IMHO, but
that's an old story) extern_protected_data flag says otherwise.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/21964] New: __start_SCN symbols aren't exported anymore, matz at suse dot de, 2017/08/14
- [Bug ld/21964] __start_SCN symbols aren't exported anymore, matz at suse dot de, 2017/08/14
- [Bug ld/21964] __start_SCN symbols aren't exported anymore, hjl.tools at gmail dot com, 2017/08/14
- [Bug ld/21964] __start_SCN symbols aren't exported anymore, matz at suse dot de, 2017/08/14
- [Bug ld/21964] __start_SCN symbols aren't exported anymore, hjl.tools at gmail dot com, 2017/08/14
- [Bug ld/21964] __start_SCN symbols aren't exported anymore,
matz at suse dot de <=
- [Bug ld/21964] __start_SCN symbols aren't exported anymore, hjl.tools at gmail dot com, 2017/08/14
- [Bug ld/21964] __start_SCN symbols aren't exported anymore, matz at suse dot de, 2017/08/14
- [Bug ld/21964] __start_SCN symbols aren't exported anymore, hjl.tools at gmail dot com, 2017/08/14
- [Bug ld/21964] __start_SCN symbols aren't exported anymore, matz at suse dot de, 2017/08/14
- [Bug ld/21964] __start_SCN symbols aren't exported anymore, matz at suse dot de, 2017/08/14
- [Bug ld/21964] __start_SCN symbols aren't exported anymore, matz at suse dot de, 2017/08/14
- [Bug ld/21964] __start_SCN symbols aren't exported anymore, matz at suse dot de, 2017/08/14
- [Bug ld/21964] __start_SCN symbols aren't exported anymore, hjl.tools at gmail dot com, 2017/08/14
- [Bug ld/21964] Invalid entry point used for executables on Windows, freddy77 at gmail dot com, 2017/08/17
- [Bug ld/21964] Invalid entry point used for executables on Windows, cvs-commit at gcc dot gnu.org, 2017/08/21