This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/20728] powerpc: Missing TOC stub in clone


https://sourceware.org/bugzilla/show_bug.cgi?id=20728

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |carlos at redhat dot com

--- Comment #1 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Tulio Magno Quites Machado Filho from comment #0)
> Error message generated by the linker:
> 
> ld: lib/libc.a(clone.o): In function `__clone':
> glibc-2.17/misc/../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:119:(.
> text+0x98): call to `__wrap__exit' lacks nop, can't restore toc;
> (-mcmodel=small toc adjust stub)
> ld: final link failed: Bad value
> 
> Which is related to the following code:
> 
> 	/* Call _exit with result from procedure.  */
> #ifdef SHARED
> 	b	JUMPTARGET(__GI__exit)
> #else
> 	b	JUMPTARGET(_exit)
> 	/* We won't ever get here but provide a nop so that the linker
> 	   will insert a toc adjusting stub if necessary.  */
> 	nop
> #endif
> 
> Older ppc64 linkers were able to generate a TOC stub after a branch + nop.
> Current linkers require a branch and link + nop.

Can you just add a nop to the SHARED case?

Alternatively you could require a newer assembler for ppc64, but that's not
very nice for users bootstrapping.

How do you plan to fix this?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]