0001-m68k-Fix-invalid-.section-syntax.patch 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. From 0bb6b7477f5dcfafbdd76eea9c7aa7a5f78d7613 Mon Sep 17 00:00:00 2001
  2. From: Ben Hutchings <benh@debian.org>
  3. Date: Fri, 16 Jun 2023 17:36:10 +0200
  4. Subject: [PATCH] m68k: Fix invalid .section syntax
  5. gas supports several different forms for .section for ELF targets,
  6. including:
  7. .section NAME [, "FLAGS"[, @TYPE[,FLAG_SPECIFIC_ARGUMENTS]]]
  8. and:
  9. .section "NAME"[, #FLAGS...]
  10. In several places we use a mix of these two forms:
  11. .section NAME, #FLAGS...
  12. A current development snapshot of binutils (2.40.50.20230611) treats
  13. this mixed syntax as an error.
  14. Change to consistently use:
  15. .section NAME, "FLAGS"
  16. as is used elsewhere in the kernel.
  17. Link: https://buildd.debian.org/status/fetch.php?pkg=linux&arch=m68k&ver=6.4%7Erc6-1%7Eexp1&stamp=1686907300&raw=1
  18. Signed-off-by: Ben Hutchings <benh@debian.org>
  19. Tested-by: Jan-Benedict Glaw <jbglaw@lug-owl.de>
  20. Link: https://lore.kernel.org/r/ZIyBaueWT9jnTwRC@decadent.org.uk
  21. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
  22. Upstream: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=922a9bd138101e3e5718f0f4d40dba68ef89bb43
  23. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  24. ---
  25. arch/m68k/fpsp040/skeleton.S | 4 ++--
  26. arch/m68k/ifpsp060/os.S | 4 ++--
  27. arch/m68k/kernel/relocate_kernel.S | 4 ++--
  28. 3 files changed, 6 insertions(+), 6 deletions(-)
  29. diff --git a/arch/m68k/fpsp040/skeleton.S b/arch/m68k/fpsp040/skeleton.S
  30. index 439395aa6fb4..081922c72daa 100644
  31. --- a/arch/m68k/fpsp040/skeleton.S
  32. +++ b/arch/m68k/fpsp040/skeleton.S
  33. @@ -499,13 +499,13 @@ in_ea:
  34. dbf %d0,morein
  35. rts
  36. - .section .fixup,#alloc,#execinstr
  37. + .section .fixup,"ax"
  38. .even
  39. 1:
  40. jbsr fpsp040_die
  41. jbra .Lnotkern
  42. - .section __ex_table,#alloc
  43. + .section __ex_table,"a"
  44. .align 4
  45. .long in_ea,1b
  46. diff --git a/arch/m68k/ifpsp060/os.S b/arch/m68k/ifpsp060/os.S
  47. index 7a0d6e428066..89e2ec224ab6 100644
  48. --- a/arch/m68k/ifpsp060/os.S
  49. +++ b/arch/m68k/ifpsp060/os.S
  50. @@ -379,11 +379,11 @@ _060_real_access:
  51. | Execption handling for movs access to illegal memory
  52. - .section .fixup,#alloc,#execinstr
  53. + .section .fixup,"ax"
  54. .even
  55. 1: moveq #-1,%d1
  56. rts
  57. -.section __ex_table,#alloc
  58. +.section __ex_table,"a"
  59. .align 4
  60. .long dmrbuae,1b
  61. .long dmrwuae,1b
  62. diff --git a/arch/m68k/kernel/relocate_kernel.S b/arch/m68k/kernel/relocate_kernel.S
  63. index ab0f1e7d4653..f7667079e08e 100644
  64. --- a/arch/m68k/kernel/relocate_kernel.S
  65. +++ b/arch/m68k/kernel/relocate_kernel.S
  66. @@ -26,7 +26,7 @@ ENTRY(relocate_new_kernel)
  67. lea %pc@(.Lcopy),%a4
  68. 2: addl #0x00000000,%a4 /* virt_to_phys() */
  69. - .section ".m68k_fixup","aw"
  70. + .section .m68k_fixup,"aw"
  71. .long M68K_FIXUP_MEMOFFSET, 2b+2
  72. .previous
  73. @@ -49,7 +49,7 @@ ENTRY(relocate_new_kernel)
  74. lea %pc@(.Lcont040),%a4
  75. 5: addl #0x00000000,%a4 /* virt_to_phys() */
  76. - .section ".m68k_fixup","aw"
  77. + .section .m68k_fixup,"aw"
  78. .long M68K_FIXUP_MEMOFFSET, 5b+2
  79. .previous
  80. --
  81. 2.41.0