Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b6cbd09

Browse files
author
Adhemerval Zanella
committed
paflib: Fix callback TOC generation for ELFv2
This patch fixes the TOC generations for ELFv2 by making a nop since it is already synthesized in globals calls.
1 parent e1073d6 commit b6cbd09

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

ebb/ebb-callback-ppc64.S

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,13 +523,19 @@
523523
lxvd2x v30,0,r9; \
524524
lxvd2x v31,0,r10;
525525

526-
#define SETUP_TOC(__func) \
526+
/* The new PPC64 LE ABI the TOC is already synthesized in global calls
527+
(the case for the callback calls). */
528+
#if _CALL_ELF != 2
529+
# define SETUP_TOC(__func) \
527530
lis r2,(__func)@highest; \
528531
ori r2,r2,(__func)@higher; \
529532
rldicr r2,r2,32,31; \
530533
oris r2,r2,(__func)@h; \
531534
ori r2,r2,(__func)@l; \
532535
ld r2,8(r2);
536+
# else
537+
# define SETUP_TOC(__func)
538+
#endif
533539

534540
.hidden __paf_ebb_ebb_hook
535541
#define CALL_EBB_HOOK \

0 commit comments

Comments
 (0)