public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [Fwd: Re: [Fwd: Linker problems]]
@ 2010-04-17 14:10 Andrei B
  2010-04-17 17:53 ` Ian Lance Taylor
  0 siblings, 1 reply; 7+ messages in thread
From: Andrei B @ 2010-04-17 14:10 UTC (permalink / raw)
  To: binutils

---------------------------- Original Message ----------------------------
Subject: Re: [Fwd: Linker problems]
From:    "Andrei B" <baie0668@localhost>
Date:    Sat, April 17, 2010 5:07 pm
To:      "Ian Lance Taylor" <iant@google.com>
--------------------------------------------------------------------------

>
> I'm not sure what you mean by "a flat binary."
>
> Precisely how is ld being invoked?
>

Hello. This is how:
---
ld -T link.ld -o kernel.bin start.o main.o scrn.o gdt.o idt.o isrs.o irq.o
timer.o kb.o
---

start.o is assembled by NASM and is a:
start.o: Linux/i386 impure executable (OMAGIC)
All other objects compiled with GCC.

Below is the link.ld script:
---
OUTPUT_FORMAT("binary")
ENTRY(start)
phys = 0x00100000;
SECTIONS
{
  .text phys : AT(phys) {
    code = .;
    *(.text)
    *(.rodata)
    . = ALIGN(4096);
  }
  .data : AT(phys + (data - code))
  {
    data = .;
    *(.data)
    . = ALIGN(4096);
  }
  .bss : AT(phys + (bss - code))
  {
    bss = .;
    *(.bss)
    . = ALIGN(4096);
  }
  end = .;
}
---
Also, to any moderators: please organize these messages if you see fit. I
am having a webmail problem which prevents me from replying directly to
the other user. Until I figure out what's wrong I can only forward my
replies.
-AB


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-04-21 14:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-17 14:10 [Fwd: Re: [Fwd: Linker problems]] Andrei B
2010-04-17 17:53 ` Ian Lance Taylor
2010-04-17 18:50   ` Andrei B
2010-04-20 15:03     ` Ian Lance Taylor
2010-04-20 17:10       ` Andrei B
2010-04-21 14:47         ` Ian Lance Taylor
2010-04-17 18:54   ` Andrei B

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).