004-fix_section_warning.patch 1003 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. When I compiled uml on x86_64, I got this warning:
  2. MODPOST vmlinux.o
  3. WARNING: vmlinux.o (.__syscall_stub.2): unexpected non-allocatable section.
  4. Did you forget to use "ax"/"aw" in a .S file?
  5. Note that for example <linux/init.h> contains
  6. section definitions for use in .S files.
  7. Because modpost checks for missing SHF_ALLOC section flag. So just
  8. add it. :)
  9. Signed-off-by: WANG Cong <[email protected]>
  10. Cc: Jeff Dike <[email protected]>
  11. Cc: Sam Ravnborg <[email protected]>
  12. ---
  13. --- a/arch/um/sys-x86_64/stub.S
  14. +++ b/arch/um/sys-x86_64/stub.S
  15. @@ -1,7 +1,7 @@
  16. #include "as-layout.h"
  17. .globl syscall_stub
  18. -.section .__syscall_stub, "x"
  19. +.section .__syscall_stub, "ax"
  20. syscall_stub:
  21. syscall
  22. /* We don't have 64-bit constants, so this constructs the address
  23. --- a/arch/um/sys-i386/stub.S
  24. +++ b/arch/um/sys-i386/stub.S
  25. @@ -1,7 +1,7 @@
  26. #include "as-layout.h"
  27. .globl syscall_stub
  28. -.section .__syscall_stub, "x"
  29. +.section .__syscall_stub, "ax"
  30. .globl batch_syscall_stub
  31. batch_syscall_stub: