Skip to content

Commit

Permalink
Merge pull request #6 from Steveice10/master
Browse files Browse the repository at this point in the history
Ensure .text.start comes first in code binaries.
  • Loading branch information
jasondellaluce committed Feb 18, 2016
2 parents d951ed3 + 088ef48 commit 2841057
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions common/payload_stage1.ld
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ SECTIONS
} >ram = 0xff
.plt : { *(.plt) } >ram = 0xff

.text.start : /* ALIGN (4): */
{
*(.text.start)
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >ram = 0xff

.text : /* ALIGN (4): */
{
*(.text .stub .text.* .gnu.linkonce.t.*)
Expand Down
6 changes: 6 additions & 0 deletions common/payload_stage2.ld
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ SECTIONS
} >ram = 0xff
.plt : { *(.plt) } >ram = 0xff

.text.start : /* ALIGN (4): */
{
*(.text.start)
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >ram = 0xff

.text : /* ALIGN (4): */
{
*(.text .stub .text.* .gnu.linkonce.t.*)
Expand Down
6 changes: 6 additions & 0 deletions payload_installer/installer/bootstrap.ld
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ SECTIONS
} >ram = 0xff
.plt : { *(.plt) } >ram = 0xff

.text.start : /* ALIGN (4): */
{
*(.text.start)
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >ram = 0xff

.text : /* ALIGN (4): */
{
*(.text .stub .text.* .gnu.linkonce.t.*)
Expand Down

0 comments on commit 2841057

Please sign in to comment.