Put entry point at start of binary on x86 platforms

Related to #881.
This commit is contained in:
Christian Helmuth 2014-12-16 16:26:55 +01:00
parent d704563453
commit 727ac4bc0c
3 changed files with 7 additions and 4 deletions

View File

@ -21,8 +21,8 @@ ENTRY(_start)
PHDRS
{
ro PT_LOAD;
rw PT_LOAD;
ro PT_LOAD;
rw PT_LOAD;
}
SECTIONS
@ -31,6 +31,9 @@ SECTIONS
/* begin of program image (link address) */
_prog_img_beg = .;
/* put entry code at the start of the text segment / raw binary */
*(.text.crt0)
*(.init)
*(.text .text.* .gnu.linkonce.t.*)
*(.fini)

View File

@ -17,7 +17,7 @@
** .text (program code) **
**************************/
.text
.section ".text.crt0"
/* program entry-point */
.global _start

View File

@ -17,7 +17,7 @@
** .text (program code) **
**************************/
.text
.section ".text.crt0"
/* program entry-point */
.global _start