blob: 6f6040b552366c317a96ad363ee4020acf566a43 [file] [log] [blame]
Kevin O'Connord2899772008-07-06 09:56:14 -04001// Linker definitions for merging 16 and 32 bit code
2//
Kevin O'Connor5b199ac2009-05-06 23:23:01 -04003// Copyright (C) 2008,2009 Kevin O'Connor <kevin@koconnor.net>
Kevin O'Connord2899772008-07-06 09:56:14 -04004//
Kevin O'Connorb1b7c2a2009-01-15 20:52:58 -05005// This file may be distributed under the terms of the GNU LGPLv3 license.
Kevin O'Connord2899772008-07-06 09:56:14 -04006
Kevin O'Connor5b8f8092009-09-20 19:47:45 -04007#include "config.h" // BUILD_BIOS_ADDR
8
9OUTPUT_FORMAT("elf32-i386")
Kevin O'Connord2899772008-07-06 09:56:14 -040010OUTPUT_ARCH("i386")
Kevin O'Connor5b199ac2009-05-06 23:23:01 -040011ENTRY(post32)
Kevin O'Connord2899772008-07-06 09:56:14 -040012SECTIONS
13{
14 .text code32_start : {
Kevin O'Connorc0693942009-06-10 21:56:01 -040015 *(.text32)
Kevin O'Connord2899772008-07-06 09:56:14 -040016
Kevin O'Connor2ceeec92009-12-19 11:03:40 -050017 . = data16_start + BUILD_BIOS_ADDR - code32_start ;
18 *(.data16)
19 . = text16_start + BUILD_BIOS_ADDR - code32_start ;
Kevin O'Connord2899772008-07-06 09:56:14 -040020 *(.text16)
Kevin O'Connor2ceeec92009-12-19 11:03:40 -050021 final_text16_end = . ;
Kevin O'Connord2899772008-07-06 09:56:14 -040022 }
Kevin O'Connorc0693942009-06-10 21:56:01 -040023 /DISCARD/ : {
24 *(.text*) *(.data*) *(.bss*) *(.rodata*)
25 *(COMMON) *(.discard*) *(.eh_frame)
26 }
Kevin O'Connord2899772008-07-06 09:56:14 -040027}