Commit c7f52cdc2f3e1733d3864e439ac2e92edd99ef31

Authored by Jeremy Fitzhardinge
1 parent b43275d661

support multiple .discard.* sections to avoid section type conflicts

gcc 4.4.4 will complain if you use a .discard section for both text and
data ("causes a section type conflict").  Add support for ".discard.*"
sections, and use .discard.text for a dummy function in the x86
RESERVE_BRK() macro.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>

Showing 2 changed files with 2 additions and 1 deletions Side-by-side Diff

arch/x86/include/asm/setup.h
... ... @@ -82,7 +82,7 @@
82 82 * executable.)
83 83 */
84 84 #define RESERVE_BRK(name,sz) \
85   - static void __section(.discard) __used \
  85 + static void __section(.discard.text) __used \
86 86 __brk_reservation_fn_##name##__(void) { \
87 87 asm volatile ( \
88 88 ".pushsection .brk_reservation,\"aw\",@nobits;" \
include/asm-generic/vmlinux.lds.h
... ... @@ -643,6 +643,7 @@
643 643 EXIT_DATA \
644 644 EXIT_CALL \
645 645 *(.discard) \
  646 + *(.discard.*) \
646 647 }
647 648  
648 649 /**