| delorie.com/archives/browse.cgi | search |
| From: | dylanmarsh AT yahoo DOT com (Dylan) |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | linking kernel |
| Date: | 18 Jun 2002 02:49:26 -0700 |
| Organization: | http://groups.google.com/ |
| Lines: | 53 |
| Message-ID: | <df0595a2.0206180149.7e15e53c@posting.google.com> |
| NNTP-Posting-Host: | 202.180.108.232 |
| X-Trace: | posting.google.com 1024393766 21863 127.0.0.1 (18 Jun 2002 09:49:26 GMT) |
| X-Complaints-To: | groups-abuse AT google DOT com |
| NNTP-Posting-Date: | 18 Jun 2002 09:49:26 GMT |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
Ive been playing around with grub and a small kernel using djgpp and
its AT&T syntax style assembly language. gcc version is 2.953, ld
version is 2.11.2.
nasm -o start.o -f elf start.asm
gcc -o kernel.o -c kernel.c
gcc -Wall -o asm.o -c asm.S
ld-elf -T kernel.ls asm.o start.o kernel.o -o kernel // <<< problem
line
the nasm file compiles and links and so does the C file. The asm.S
file compiles but doesn't link it says it can't recognize the file.
Do I need a different linker?
Any ideas?
Here is the linker script:
/* kernel.ls */
physical_load_addr = 0x00101000;
ENTRY (KernelEntry)
SECTIONS
{
. = physical_load_addr;
.text :
{
*(.text)
*(.rodata)
}
.data ALIGN (0x1000) :
{
*(.data)
}
.bss :
{
_sbss = .;
*(COMMON)
*(.bss)
_ebss = .;
}
}
I can post more code and info if needed.
Thanks for your help
Dylan
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |