blob: 3d59fad4b531b910547fe7acc8e3563e026518b1 [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'Connord2899772008-07-06 09:56:14 -04007OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
8OUTPUT_ARCH("i386")
Kevin O'Connor5b199ac2009-05-06 23:23:01 -04009ENTRY(post32)
Kevin O'Connord2899772008-07-06 09:56:14 -040010SECTIONS
11{
12 .text code32_start : {
Kevin O'Connorc0693942009-06-10 21:56:01 -040013 *(.text32)
Kevin O'Connorc95d2ce2009-07-29 20:41:39 -040014 *(.data32.version)
Kevin O'Connord2899772008-07-06 09:56:14 -040015
16 . = code16_start ;
Kevin O'Connord2899772008-07-06 09:56:14 -040017 *(.text16)
Kevin O'Connor711ddc62009-01-17 15:17:34 -050018 final_code16_end = . ;
Kevin O'Connord2899772008-07-06 09:56:14 -040019 }
Kevin O'Connorc0693942009-06-10 21:56:01 -040020 /DISCARD/ : {
21 *(.text*) *(.data*) *(.bss*) *(.rodata*)
22 *(COMMON) *(.discard*) *(.eh_frame)
23 }
Kevin O'Connord2899772008-07-06 09:56:14 -040024}