From 4a8c2229ce1589ac68d0f447561947daf20441d3 Mon Sep 17 00:00:00 2001 From: grischka Date: Mon, 16 Feb 2009 15:13:29 +0100 Subject: [PATCH] win32: allow user segments as writable & executable --- tccpe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tccpe.c b/tccpe.c index 6b68ff0..1d6c7fd 100644 --- a/tccpe.c +++ b/tccpe.c @@ -343,10 +343,10 @@ enum { sec_data , sec_bss , sec_idata , + sec_other , sec_rsrc , sec_stab , sec_reloc , - sec_last }; @@ -355,6 +355,7 @@ ST_DATA DWORD pe_sec_flags[] = { 0xC0000040, /* ".data" , */ 0xC0000080, /* ".bss" , */ 0x40000040, /* ".idata" , */ + 0xE0000060, /* < other > , */ 0x40000040, /* ".rsrc" , */ 0x42000802, /* ".stab" , */ 0x42000040, /* ".reloc" , */ @@ -960,6 +961,7 @@ ST_FN int pe_section_class(Section *s) return sec_rsrc; if (0 == strcmp(name, ".iedat")) return sec_idata; + return sec_other; } else if (type == SHT_NOBITS) { if (flags & SHF_WRITE) return sec_bss;