Jump to content


Photo
- - - - -

Compiler, Assembler, Linker and Loader: A Brief Story


  • Please log in to reply
2 replies to this topic

#1 PurpleJesus

PurpleJesus

    Dangerous free thinker

  • Members
  • 1,578 posts
  • Gender:Male
  • Location:800

Posted 05 October 2009 - 07:56 AM

Compiler, Assembler, Linker and Loader: A Brief Story

http://www.tenouk.com/ModuleW.html

#2 SigFLUP

SigFLUP

    SUPR3M3 31337 Mack Daddy P1MP

  • Members
  • 367 posts
  • Gender:Not Telling

Posted 05 October 2009 - 11:55 AM

Compiler, Assembler, Linker and Loader: A Brief Story

http://www.tenouk.com/ModuleW.html


As a note for people linking, you also have quite a bit of control of where things are to be placed inside an executable using "linker scripts" with ld. It's actually kinda neat. For an example, here's the linker script for compiling programs for the sega-genesis.

OUTPUT_FORMAT(binary);

MEMORY
{
 rom (rx)  : org = 0, len = 0x3fffff
 io (!w!r!x) : org = 0x400000, len = 0xbf0000
 debug (!w!r!x) : org = 0xff0000, len = 0xff
 ram (w!x) : org = 0xff0100, len = 0xff00
}

SECTIONS
{
 . = 0x00;
 .text : { *(.text) }
}


#3 SchippStrich

SchippStrich

    SUP3R 31337 P1MP

  • Members
  • 293 posts
  • Country:
  • Gender:Male
  • Location:USA

Posted 06 October 2009 - 02:32 AM

Good post, this is something I have been wanting to learn more about.




BinRev is hosted by the great people at Lunarpages!