@@ -346,6 +346,15 @@ int main(int argc, char *argv[])
memcmp(sec1[i].name, ".lockpro", sizeof(sec1[i].name)) == 0 )
continue;
+ /* For sections with relocations, force them to be writeable */
+ if (memcmp(sec1[i].name, ".init.da", sizeof(sec1[i].name)) == 0)
+ printf(".pushsection .init.data, \"awx\"\n");
+ else if (memcmp(sec1[i].name, ".init.te", sizeof(sec1[i].name) ) == 0)
+ printf(".pushsection .init.text, \"awx\"\n");
+ else
+ printf(".pushsection %.*s, \"awx\"\n", (int)sizeof(sec1[i].name), sec1[i].name);
+ printf(".popsection\n");
+
if ( !sec1[i].rva )
{
fprintf(stderr, "Can't handle section %u with zero RVA\n", i);