Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7f52cdc authored by Jeremy Fitzhardinge's avatar Jeremy Fitzhardinge
Browse files

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: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
parent b43275d6
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -82,7 +82,7 @@ void *extend_brk(size_t size, size_t align);
 * executable.)
 * executable.)
 */
 */
#define RESERVE_BRK(name,sz)						\
#define RESERVE_BRK(name,sz)						\
	static void __section(.discard) __used				\
	static void __section(.discard.text) __used			\
	__brk_reservation_fn_##name##__(void) {				\
	__brk_reservation_fn_##name##__(void) {				\
		asm volatile (						\
		asm volatile (						\
			".pushsection .brk_reservation,\"aw\",@nobits;" \
			".pushsection .brk_reservation,\"aw\",@nobits;" \
+1 −0
Original line number Original line Diff line number Diff line
@@ -643,6 +643,7 @@
	EXIT_DATA							\
	EXIT_DATA							\
	EXIT_CALL							\
	EXIT_CALL							\
	*(.discard)							\
	*(.discard)							\
	*(.discard.*)							\
	}
	}


/**
/**