This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ld scripting help


I am trying to link a file in a specific way and need help understanding how to write the linker script.
I know that the order of the sections needs to be.

SECTIONS
}
.text
.syscall
.fixaddr
.fixtype
.intercall
.interfunc
.rodata
.secinfo
.data
.bss
}

And I know that the application needs to start at 0x00000000.

I tried 

OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm","elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_start)
SEARCH_DIR("/scratch/paul/release/install/i686-mingw32/arm-none-elf/arm-none-elf/lib");
SECTIONS
{
??????????? .text 0x00000000 : {*(.test)}
??????????? current = .;
??????????? .syscall current :{*(.syscall)}
??????????? current = .;
??????????? .fixaddr current :{*(.fixaddr)}
??????????? current = .;
??????????? .fixtype current :{*(.fixtype)}
??????????? current = .;
??????????? .intercall current :{*(.intercall)}
??????????? current = .;
??????????? .rodata current :{*(.rodata)}
??????????? current = .;
??????????? .secinfo current :{*(.secinfo)}
??????????? current = .;
??????????? .data current :{*(.data)}
??????????? current = .;
??????????? .bss current :{*(.bss)}



}
Just to see if it would work

I'm new to linker scripts so I would appreciate any help you could give me. I am using ld 2.15.94 on windows 2000.

Additionally I am getting a "_start not found" error. I have tried to include crt0.o directly from the lib directory and using the script I just showed, but is complains about

?In function _sbrk within file Libg.a 
??????????? End <- undefined reference

In function start within file crt0.S
??????????? _int
??????????? __bss_start__
??????????? __bss_end__
??????????? _fini

Thank you for your time.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]