I'm a foreigner and I'd like to ask you a question


The binary program that I link to with the script below simply cannot execute
I want to merge all SECTIONS as .code

ENTRY(_nomain)
SECTIONS
{
.= 0x00400000 + SIZEOF_HEADERS;
.code : {*(.text) *(.rdata) *(.idata)}
/DISCARD/ : {*(.comment)}
}

The code is simple
Compile with mingw

#include <stdio.h>
#include <stdlib.h>
void nomain()
{
puts("ok");
exit(0);
}

Who knows how to do the right links ?
Very grateful to you
Last edited on
Topic archived. No new replies allowed.