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]

Re: ld: section can't be allocated in segment 1


H.J. Lu schrieb:
On Sat, Oct 20, 2007 at 02:32:29AM +0200, Clemens Koller wrote:
                       -Map u-boot.map -o u-boot
ld: u-boot: section `.bootpg' can't be allocated in segment 1
LOAD: .bootpg .resetvec
ld: final link failed: Bad value
make: *** [u-boot] Error 1

What does "readelf -S" report on .bootpg and .resetvec sections?

I hope this will help (created with latest binutils).


$ readelf -S start.o
There are 22 section headers, starting at offset 0x1dc4:

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        00000000 000040 0016f4 00  AX  0   0 16
 [ 2] .rela.text        RELA            00000000 002aa4 0000f0 0c     20   1  4
 [ 3] .data             PROGBITS        00000000 001734 000000 00  WA  0   0  1
 [ 4] .bss              NOBITS          00000000 001734 000000 00  WA  0   0  1
 [ 5] .got2             PROGBITS        00000000 001734 000024 00  WA  0   0  1
 [ 6] .rela.got2        RELA            00000000 002b94 00006c 0c     20   5  4
 [ 7] .bootpg           PROGBITS        00000000 001758 000220 00  AX  0   0  1
 [ 8] .rela.bootpg      RELA            00000000 002c00 000018 0c     20   7  4
 [ 9] .PPC.EMB.apuinfo  NOTE            00000000 001978 00001c 00      0   0  1
 [10] .debug_line       PROGBITS        00000000 001994 0002b3 00      0   0  1
 [11] .rela.debug_line  RELA            00000000 002c18 000018 0c     20  10  4
 [12] .debug_info       PROGBITS        00000000 001c47 00006a 00      0   0  1
 [13] .rela.debug_info  RELA            00000000 002c30 000024 0c     20  12  4
 [14] .debug_abbrev     PROGBITS        00000000 001cb1 000012 00      0   0  1
 [15] .debug_aranges    PROGBITS        00000000 001cc8 000028 00      0   0  8
 [16] .rela.debug_arang RELA            00000000 002c54 000024 0c     20  15  4
 [17] .debug_ranges     PROGBITS        00000000 001cf0 000020 00      0   0  8
 [18] .rela.debug_range RELA            00000000 002c78 000030 0c     20  17  4
 [19] .shstrtab         STRTAB          00000000 001d10 0000b1 00      0   0  1
 [20] .symtab           SYMTAB          00000000 002134 0005b0 10     21  36  4
 [21] .strtab           STRTAB          00000000 0026e4 0003bf 00      0   0  1
Key to Flags:
 W (write), A (alloc), X (execute), M (merge), S (strings)
 I (info), L (link order), G (group), x (unknown)
 O (extra OS processing required) o (OS specific), p (processor specific)

$ readelf -S resetvec.o
There are 16 section headers, starting at offset 0x198:

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        00000000 000034 000000 00  AX  0   0  1
 [ 2] .data             PROGBITS        00000000 000034 000000 00  WA  0   0  1
 [ 3] .bss              NOBITS          00000000 000034 000000 00  WA  0   0  1
 [ 4] .resetvec         PROGBITS        00000000 000034 000004 00  AX  0   0  1
 [ 5] .rela.resetvec    RELA            00000000 0004c8 00000c 0c     14   4  4
 [ 6] .debug_line       PROGBITS        00000000 000038 000038 00      0   0  1
 [ 7] .rela.debug_line  RELA            00000000 0004d4 00000c 0c     14   6  4
 [ 8] .debug_info       PROGBITS        00000000 000070 00006e 00      0   0  1
 [ 9] .rela.debug_info  RELA            00000000 0004e0 000030 0c     14   8  4
 [10] .debug_abbrev     PROGBITS        00000000 0000de 000014 00      0   0  1
 [11] .debug_aranges    PROGBITS        00000000 0000f8 000020 00      0   0  8
 [12] .rela.debug_arang RELA            00000000 000510 000018 0c     14  11  4
 [13] .shstrtab         STRTAB          00000000 000118 00007f 00      0   0  1
 [14] .symtab           SYMTAB          00000000 000418 0000a0 10     15   9  4
 [15] .strtab           STRTAB          00000000 0004b8 00000d 00      0   0  1
Key to Flags:
 W (write), A (alloc), X (execute), M (merge), S (strings)
 I (info), L (link order), G (group), x (unknown)
 O (extra OS processing required) o (OS specific), p (processor specific)


Hopefully, I will be able to get some time this week to give myself an update on what's going on there and compare the output of some older binutils.

Thank you, so far!

--
Clemens Koller
_______________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Str. 45/1
81379 Muenchen
Germany

http://www.anagramm-technology.com
Phone: +49-89-741518-50
Fax: +49-89-741518-19


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