logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

0.8.4-powerpc_jmp_weak.patch (1314B)


  1. From bd0efd1f062bfba5dd2d6b1fe30b6949f8e0a8ef Mon Sep 17 00:00:00 2001
  2. From: sterlingjensen <5555776+sterlingjensen@users.noreply.github.com>
  3. Date: Mon, 24 Aug 2020 22:41:05 -0500
  4. Subject: [PATCH] Mark lua setjmp/longjmp for powerpc weak
  5. Linux already defines setjmp/longjmp for powerpc, which leads to
  6. duplicate symbols in a statically linked build.
  7. Signed-off-by: Sterlng Jensen <sterlingjensen@users.noreply.github.com>
  8. ---
  9. module/lua/setjmp/setjmp_ppc.S | 10 +++++-----
  10. 1 file changed, 5 insertions(+), 5 deletions(-)
  11. diff --git a/module/lua/setjmp/setjmp_ppc.S b/module/lua/setjmp/setjmp_ppc.S
  12. index f787ef34913..72aa5d5ab5b 100644
  13. --- a/module/lua/setjmp/setjmp_ppc.S
  14. +++ b/module/lua/setjmp/setjmp_ppc.S
  15. @@ -56,7 +56,7 @@
  16. #define ENTRY(name) \
  17. .align 2 ; \
  18. .type name,@function; \
  19. - .globl name; \
  20. + .weak name; \
  21. name:
  22. #else /* PPC64_ELF_ABI_v1 */
  23. @@ -65,8 +65,8 @@ name:
  24. #define GLUE(a,b) XGLUE(a,b)
  25. #define ENTRY(name) \
  26. .align 2 ; \
  27. - .globl name; \
  28. - .globl GLUE(.,name); \
  29. + .weak name; \
  30. + .weak GLUE(.,name); \
  31. .pushsection ".opd","aw"; \
  32. name: \
  33. .quad GLUE(.,name); \
  34. @@ -83,8 +83,8 @@ GLUE(.,name):
  35. #define ENTRY(name) \
  36. .text; \
  37. .p2align 4; \
  38. - .globl name; \
  39. - .type name,@function; \
  40. + .weak name; \
  41. + .type name,@function; \
  42. name:
  43. #endif /* __powerpc64__ */