Skip to content

Commit

Permalink
x86, realmode: Add .text64 section, make barrier symbols absolute
Browse files Browse the repository at this point in the history
Add a .text64 section.  The purpose of this is to keep 16-, 32- and
64-bit code segregated into separate sections, mainly to keep
disassembly sane.

Move barrier symbols out of sections to avoid the "symbol in empty
section" problem in some versions of GNU ld.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Link: http://lkml.kernel.org/r/1336501366-28617-10-git-send-email-jarkko.sakkinen@intel.com
  • Loading branch information
H. Peter Anvin committed May 8, 2012
1 parent 2a6de31 commit 487f50f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions arch/x86/realmode/rm/realmode.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,23 @@ SECTIONS
}

. = ALIGN(PAGE_SIZE);
pa_text_start = .;
.text : {
pa_text_start = .;
*(.text)
*(.text.*)
}

.text32 : {
*(.text32)
*(.text32.*)
pa_ro_end = .;
}

.text64 : {
*(.text64)
*(.text64.*)
}
pa_ro_end = .;

. = ALIGN(PAGE_SIZE);
.data : {
*(.data)
Expand All @@ -59,8 +64,8 @@ SECTIONS
. = ALIGN(4);
.signature : {
*(.signature)
pa_end = .;
}
pa_end = .;

/DISCARD/ : {
*(.note*)
Expand Down

0 comments on commit 487f50f

Please sign in to comment.