mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-30 10:38:55 +00:00
Define '__dso_handle' in shared libraries.
The '__dso_handle' symbol is needed when building with GCC 4.7. Fixes #437.
This commit is contained in:
parent
9d08c2b675
commit
5a88e106df
@ -19,6 +19,13 @@ typedef void (*ld_hook)(void);
|
||||
static ld_hook _lctors_start[1] SECTION("_mark_ctors_start") = BEG;
|
||||
static ld_hook _lctors_end[1] SECTION("_mark_ctors_end") = END;
|
||||
|
||||
/*
|
||||
* '__dso_handle' needs to be defined in the main program and in each shared
|
||||
* object. Because ld.lib.so is both of them, '__dso_handle' is weak here.
|
||||
*/
|
||||
void *__dso_handle __attribute__((__visibility__("hidden")))
|
||||
__attribute__((weak)) = &__dso_handle;
|
||||
|
||||
/* called by dynamic linker on library startup (ld-genode.so) */
|
||||
extern "C" {
|
||||
void _init(void) __attribute__((used,section(".init")));
|
||||
|
Loading…
Reference in New Issue
Block a user