tech-userlevel archive

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

Re: failing to link siglongjmp with clang



On Wed, Apr 25, 2012 at 05:28:04PM -0400, James K. Lowden wrote:
> How does the symbol renaming magic work in libc?  
> 
> Using clang 1.0 (yeah, I know) siglongjmp fails to link 
> 
> interrupt.o: In function `inactive_interrupt_handler':
> [...]/src/apps/fisql/../../../../src/apps/fisql/interrupt.c:31:
> undefined reference to `siglongjmp' collect2: ld returned 1 exit status
> 
> for pretty obvious reasons
> 
> $ nm /usr/lib/libc.so | grep siglongjmp
> 0000000000054650 T __siglongjmp14
> 
> $ nm interrupt.o | grep siglongjmp
>                  U siglongjmp
> 
> What to do, please?  

Include the header that defines siglongjmp. It is defined something like

siglongjmp() __asm__("__siglongjmp14");

which instructs the compiler to emit calls via the latter name. I'm not
sure if assembler naming support was supported by such ancient Clang.

Joerg


Home | Main Index | Thread Index | Old Index