Skip to content

Instantly share code, notes, and snippets.

@strangeglyph
Last active January 7, 2016 22:45
Show Gist options
  • Save strangeglyph/42016c43287e5b4a6284 to your computer and use it in GitHub Desktop.
Save strangeglyph/42016c43287e5b4a6284 to your computer and use it in GitHub Desktop.
ENTRY(start)
SECTIONS {
. = 1M;
.boot :
{
KEEP(*(.multiboot_header))
}
.text :
{
*(.text .text.*)
}
.rodata : {
*(.rodata .rodata.*)
}
.data.rel.ro : {
*(.data.rel.ro.local*) *(.data.rel.ro .data.rel.ro.*)
}
. = ALIGN(64K);
introffset_low_bits = . & 0xffff;
introffset_mid_bits = (. >> 16) & 0xffff;
introffset_high_bits = . >> 32;
.interrupts :
{
KEEP(*(.interrupt_handlers .interrupt_handlers.*))
}
}
》 objdump -t build/kernel-x86_64.bin | grep "in..offset"
0000000000000012 g *ABS* 0000000000000000 introffset_mid_bits
0000000000000000 g *ABS* 0000000000000000 introffset_high_bits
0000000000000000 g *ABS* 0000000000000000 introffset_low_bits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment