Find the answer to your Linux question:
Results 1 to 4 of 4
say i am wondering how to use ld to change a gcc elf file into a bin file that i can put in the boot sector of a floppy and ...
  1. #1
    Just Joined!
    Join Date
    Mar 2009
    Posts
    37

    ld elf to bin

    say i am wondering how to use ld to change a gcc elf file into a bin file that i can put in the boot sector of a floppy and boot from does any body know how or know where i can find a good tutorial or explination

  2. #2
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    The best I could do, when I did this, was to compile an asm file with the .code16 directive and then use readelf to extract the text section and then use this as raw hex for the boot file...G1434
    Make mine Arch Linux

  3. #3
    Just Joined!
    Join Date
    Mar 2009
    Posts
    37
    ok i guess i will have to do that unless find a better way

  4. #4
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    I heard some people say that NASM supports bin files but like I said 'I only heard' and never tried it myself. I pretty much force the code to do what I wanted with GNU as , readelf, and a small linker scipt ...Gerard4143
    Make mine Arch Linux

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...