Executable file loading from weaver.elf
Sven Fülster
mx at ...19...
Thu Jul 16 09:52:18 CEST 2009
Hi Norman,
my nice plan for supporting debugging by linking my executable to
another address failed.
I've added
--
LD_SCRIPT = $(call select_from_repositories,src/platform/genode.ld)
CXX_LINK_OPT = -static -nostdlib -Wl,-nostdlib
CXX_LINK_OPT += -Wl,-T$(LD_SCRIPT) -Wl,-Ttext=0x01000000
--
to its target.mk. That worked fine.
--
kamikaze at ...22...:~/okl4/okl4_2.1.1-fix.7/genode-okl4-x86$ readelf
-S bin/test-dde_linux26_net
There are 30 section headers, starting at offset 0x4ec040:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg
Lk Inf Al
[ 0] NULL 00000000 000000 000000 00
0 0 0
[ 1] .text PROGBITS 01000000 082000 06c1cc 00 AX
0 0 128
[ 2] .altinstr_replace PROGBITS 0106c1cc 0ee1cc 00011d 00 AX
0 0 1
[ 3] .sched.text PROGBITS 0106c2f0 0ee2f0 000f26 00 AX
0 0 16
[ 4] .kprobes.text PROGBITS 0106d216 0ef216 000058 00 AX
0 0 1
[ 5] .spinlock.text PROGBITS 0106d26e 0ef26e 0001e7 00 AX
0 0 1
[ 6] .fixup PROGBITS 0106d455 0ef455 00002a 00 AX
0 0 1
[ 7] __ex_table PROGBITS 0106d47f 0ef47f 000130 00 A
0 0 1
[ 8] .data PROGBITS 0106e000 0f0000 009cd0 00 WA
0 0 128
[ 9] .got PROGBITS 01077cd0 0f9cd0 000088 04 WA
0 0 4
[10] .got.plt PROGBITS 01077d58 0f9d58 00000c 04 WA
0 0 4
[11] .init.setup PROGBITS 01077d64 0f9d64 000030 00 WA
0 0 4
[12] .eh_frame PROGBITS 01077d94 0f9d94 006c30 00 A
0 0 4
[13] .gcc_except_table PROGBITS 0107e9c4 1009c4 0012e0 00 A
0 0 4
[14] .altinstructions PROGBITS 0107fca4 101ca4 000473 00 A
0 0 4
[15] .smp_locks PROGBITS 01080118 102118 0004ec 00 A
0 0 4
[16] __param PROGBITS 01080604 102604 000208 00 A
0 0 4
[17] .bss NOBITS 01080880 10280c 01e4e0 00 WA
0 0 128
[18] .debug_abbrev PROGBITS 00000000 10280c 0236a2 00
0 0 1
[19] .debug_info PROGBITS 00000000 125eae 2be0b6 00
0 0 1
[20] .debug_line PROGBITS 00000000 3e3f64 03d9ac 00
0 0 1
[21] .debug_frame PROGBITS 00000000 421910 01ff78 00
0 0 4
[22] .debug_loc PROGBITS 00000000 441888 06426e 00
0 0 1
[23] .debug_pubnames PROGBITS 00000000 4a5af6 015b4b 00
0 0 1
[24] .debug_aranges PROGBITS 00000000 4bb648 003858 00
0 0 8
[25] .debug_str PROGBITS 00000000 4beea0 029bf7 01 MS
0 0 1
[26] .debug_ranges PROGBITS 00000000 4e8a98 003460 00
0 0 8
[27] .shstrtab STRTAB 00000000 4ebef8 000147 00
0 0 1
[28] .symtab SYMTAB 00000000 4ec4f0 011760 10
29 1788 4
[29] .strtab STRTAB 00000000 4fdc50 01b474 00
0 0 1
--
But then, the mapping of .text and .data sections failed during startup.
The same happened when I tried 0x04000000 as base address.
--
[init] Genode::addr_t _setup_elf(Genode::Parent_capability,
Genode::Dataspace_capability, Genode::Ram_session&,
Genode::Rm_session&): addresses differ after attach (addr=1000000 out_ptr=0)
[init] Genode::addr_t _setup_elf(Genode::Parent_capability,
Genode::Dataspace_capability, Genode::Ram_session&,
Genode::Rm_session&): addresses differ after attach (addr=106e000 out_ptr=0)
Start thread ip=10545d4 sp=0, pd=4, tid=0
no RM attachment (READ pf_addr=0 pf_ip=10545d4 from 04)
--
Is there anything else I must know about the startup process?
Sven
--
Sven Fülster
More information about the users
mailing list