LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-25-2004, 12:26 PM   #1
inuyaga
LQ Newbie
 
Registered: Sep 2004
Posts: 1

Rep: Reputation: 0
LD linker code offset problem


Hey i need help with the LD linker. I am trying to compile a os image and the linker keeps putting the windows dos headder on the top of the file and setting the code offset to 400h. IS there any way to remove the header so the code starts at offset 0h in the image file?

Disassembly of File: C:\Documents and Settings\Chris\Desktop\Kernel\ALISKERNEL\Kernel Build\a.exe

//right here is the problem Code Offset = 00000400
//this needs to be 0
Code Offset = 00000400, Code Size = 00000A00
Data Offset = 000011A0, Data Size = 00000200

Number of Objects = 0004 (dec), Imagebase = 00400000h

Object01: .text RVA: FFC08000 Offset: 00000400 Size: 00000A00 Flags: 60000020
Object02: .debug RVA: FFC09000 Offset: 00000E00 Size: 00000200 Flags: 42000040
Object03: .data RVA: FFC091A0 Offset: 000011A0 Size: 00000200 Flags: C0000040
Object04: .bss RVA: FFC091B0 Offset: 00000000 Size: 00000000 Flags: C0000080

//also the Entry Point needs to be 00008000
Program Entry Point = 00008820


:00008000 55 push ebp

Any help would be great. realley dont feel like writing my own linker. probley should though. Nothing is a good for what you want to do than somthing you did yourself.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linker problem bahadur Programming 4 11-26-2005 06:43 AM
compile/linker problem with simple libipq code TheLinuxDuck Programming 7 05-06-2005 01:28 PM
LD linker doesn't remove unreachable code ? vips Programming 3 09-08-2004 08:12 AM
Resolution problem: offset workspace cesium Linux - Software 1 05-08-2002 09:27 PM
Mouse Offset Problem AgedMan Linux - General 1 12-03-2001 11:08 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration