search for: weak_alias

Displaying 10 results from an estimated 10 matches for "weak_alias".

2013 Jan 09
4
[LLVMdev] [lld] ELF weak aliases
...o I just got lua to link and run and work on x86-64 Linux with musl and lld. It did require one change to hack around incorrect handling of ELF weak aliases. In musl __stdio_exit.c <http://git.musl-libc.org/cgit/musl/tree/src/stdio/__stdio_exit.c> we have: static FILE *const dummy_file = 0; weak_alias(dummy_file, __stdin_used); weak_alias(dummy_file, __stdout_used); weak_alias(dummy_file, __stderr_used); weak_alias(old, new) is defined as: extern __typeof(old) new __attribute__((weak, alias(#old))) This generates the following object file: mspencer at mspencer-vm:~/Projects/test$ objdump -st ....
2017 Jun 06
4
LLD support for mach-o aliases (weak or otherwise)
...mach-o format supports aliases, but the functionality has not been exposed via the linker (ld64/LLD). - http://blog.omega-prime.co.uk/?p=121 <http://blog.omega-prime.co.uk/?p=121> The musl code does the following which currently errors out saying aliases are not currently supported: #undef weak_alias #define weak_alias(old, new) \ extern __typeof(old) new __attribute__((weak, alias(#old))) and the macro is used internally like this: int __pthread_join(pthread_t t, void **res) { // implementation here } weak_alias(__pthread_join, pthread_join); The problem is the actual expor...
2013 Jan 09
0
[LLVMdev] [lld] ELF weak aliases
...x86-64 Linux with musl > and lld. It did require one change to hack around incorrect handling > of ELF weak aliases. > > In musl __stdio_exit.c > <http://git.musl-libc.org/cgit/musl/tree/src/stdio/__stdio_exit.c> we > have: > > static FILE *const dummy_file = 0; > weak_alias(dummy_file, __stdin_used); > weak_alias(dummy_file, __stdout_used); > weak_alias(dummy_file, __stderr_used); > > weak_alias(old, new) is defined as: extern __typeof(old) new > __attribute__((weak, alias(#old))) > > This generates the following object file: > mspencer at ms...
2013 Jan 09
0
[LLVMdev] [lld] ELF weak aliases
...nition for __stdout_used, the atom gets the property of the other object which defines the atom isnt it, and so as the ordinal too riht ? Couldnt follow how did the others move ? This is what I see with binutils/ld :- $cat 1.c #include "stdio_impl.h" static FILE *const dummy_file = 0; weak_alias(dummy_file, __stdin_used); weak_alias(dummy_file, __stdout_used); weak_alias(dummy_file, __stderr_used); $cat 2.c int __stdout_used = 10; $readelf -s 1.o | grep -E 'used|dummy_file' 6: 0000000000000000 8 OBJECT LOCAL DEFAULT 4 dummy_file 9: 0000000000000000 8 OBJECT...
2017 Jun 14
1
LLD support for mach-o aliases (weak or otherwise)
..., but the functionality has not been exposed via the linker (ld64/LLD). > > - http://blog.omega-prime.co.uk/?p=121 <http://blog.omega-prime.co.uk/?p=121> > > The musl code does the following which currently errors out saying aliases are not currently supported: > > #undef weak_alias > #define weak_alias(old, new) \ > extern __typeof(old) new __attribute__((weak, alias(#old))) > > and the macro is used internally like this: > > int __pthread_join(pthread_t t, void **res) > { > // implementation here > } > > weak_alias(__pthrea...
2017 Jun 14
4
LLD support for mach-o aliases (weak or otherwise)
...the linker (ld64/LLD). >>> >>> - http://blog.omega-prime.co.uk/?p=121 <http://blog.omega-prime.co.uk/?p=121> >>> >>> The musl code does the following which currently errors out saying aliases are not currently supported: >>> >>> #undef weak_alias >>> #define weak_alias(old, new) \ >>> extern __typeof(old) new __attribute__((weak, alias(#old))) >>> >>> and the macro is used internally like this: >>> >>> int __pthread_join(pthread_t t, void **res) >>> { >>>...
2013 Jan 09
2
[LLVMdev] [lld] ELF weak aliases
...isnt it, and > so as the ordinal too riht ? > > Couldnt follow how did the others move ? I'm not quite sure what you mean here. > > This is what I see with binutils/ld :- > > $cat 1.c > #include "stdio_impl.h" > > static FILE *const dummy_file = 0; > weak_alias(dummy_file, __stdin_used); > weak_alias(dummy_file, __stdout_used); > weak_alias(dummy_file, __stderr_used); > > $cat 2.c > int __stdout_used = 10; > $readelf -s 1.o | grep -E 'used|dummy_file' > 6: 0000000000000000 8 OBJECT LOCAL DEFAULT 4 dummy_file >...
2006 Jun 26
0
[klibc 35/43] sparc support for klibc
...+#define ASENTRY(name) _ENTRY(_ASM_LABEL(name)); _PROF_PROLOGUE +#define FUNC(name) ASENTRY(name) +#define RODATA(name) .align 4; .text; .globl _C_LABEL(name); \ + OTYPE(_C_LABEL(name)); _C_LABEL(name): + +#define ASMSTR .asciz + +#define RCSID(name) .asciz name + +#ifdef __ELF__ +#define WEAK_ALIAS(alias,sym) \ + .weak alias; \ + alias = sym +#endif + +/* + * WARN_REFERENCES: create a warning if the specified symbol is referenced. + */ +#ifdef __ELF__ +#ifdef __STDC__ +#define WARN_REFERENCES(_sym,_msg) \ + .section .gnu.warning. ## _sym ; .ascii _msg ; .text +#else +#define WAR...
2016 Aug 18
5
[PATCH v2 0/4] New getprogname module
Hi, as discussed in [1], this series adds a new getprogname module. All it does is providing a getprogname function, much like what is found on e.g. *BSD systems, and using it in gnulib instead of progname. Also, using it explicitly by modules avoids gnulib users the need of either use the progname module (GPL), or to provide program_name (and call set_program_name manually, which is not always
2006 Jun 28
35
[klibc 00/31] klibc as a historyless patchset (updated and reorganized)
I have updated the klibc patchset based on feedback received. In particular, the patchset has been reorganized so as not to break git-bisect. Additionally, this updates the patch base to 2.6.17-git12 (d38b69689c349f35502b92e20dafb30c62d49d63) and klibc 1.4.8; the main difference on the klibc side is removal of obsolete code. This is also available as a git tree at: