gold mistreats -Wl,-Ttext,0x8200

2012-03-10 Thread Vladimir 'φ-coder/phcoder' Serbinenko
Namely the minimal testcase is:
gcc -o 1.img -ffreestanding -Wl,-Ttext,0x8200 1.S -nostdlib -m32
The resulting file has .text at 9200 and not 8200
1.S:
.text

.globl _start
_start:

-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko




signature.asc
Description: OpenPGP digital signature
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13561] AIX link failure: RLD address not contained in section

2012-03-10 Thread ka5427-536 at online dot de
http://sourceware.org/bugzilla/show_bug.cgi?id=13561

--- Comment #8 from Hans-Georg Thien  2012-03-10 
17:38:05 UTC ---
(In reply to comment #6)
> here comes some more information gathered by the objdump command:
> 
>   sandbox@rs6k> objdump  -r partial.o
> 
> partial.o: file format aixcoff-rs6000
> 
> RELOCATION RECORDS FOR [.text]:
> OFFSET   TYPE  VALUE
>  R_REF .data+0xed60
> 0018 R_RBR_26  ._Znwm
> 0030 R_RBR_26  ._ZNSt8auto_ptrIiEC1EPi+0xff88
> 0040 R_RBR_26  ._ZNSt8auto_ptrIiED1Ev+0xff28
> 0100 R_RBR_26  ._ZdlPv
> 0148 R_REF .data+0xed10
> 0160 R_RBR_26  ._Znwm
> 0178 R_RBR_26  ._ZNSt8auto_ptrIiEC1EPi+0xff88
> 0188 R_RBR_26  ._ZNSt8auto_ptrIiED1Ev+0xff28
> 0248 R_RBR_26  ._ZdlPv
> 
> 
> RELOCATION RECORDS FOR [.data]:
> OFFSET   TYPE  VALUE
> 0018 R_POS .text
> 0040 R_POS .text
> 0068 R_POS .text+0xfeb8
> 0090 R_POS .text+0xfeb8
> 0094 R_POS ._Z3foov
> 0098 R_POS TOC+0xec84
> 00a0 R_POS ._ZNSt8auto_ptrIiEC1EPi+0xff88
> 00a4 R_POS TOC+0xec84
> 00ac R_POS ._ZNSt8auto_ptrIiED1Ev+0xff28
> 00b0 R_POS TOC+0xec84
> 00b8 R_POS ._Z3barv+0xfeb8
> 00bc R_POS TOC+0xec84
> 00c4 R_POS ._ZNSt8auto_ptrIiEC1EPi+0xff88
> 00c8 R_POS TOC+0xec84
> 00d0 R_POS ._ZNSt8auto_ptrIiED1Ev+0xff28
> 00d4 R_POS TOC+0xec84
> 
> 
>   sandbox@rs6k> objdump --private=toc,relocs partial.o
> 
> partial.o: file format aixcoff-rs6000
> Relocations for .text (10)
> vaddrsgn mod sz type  symndx symbol
>   U  1  REF   24 .data
> 0018  S  26 RBR   4  ._Znwm
> 0030  S  26 RBR   12 ._ZNSt8auto_ptrIiEC1EPi
> 0040  S  26 RBR   14 ._ZNSt8auto_ptrIiED1Ev
> 0100  S  26 RBR   6  ._ZdlPv
> 0148  U  1  REF   38 .data
> 0160  S  26 RBR   4  ._Znwm
> 0178  S  26 RBR   12 ._ZNSt8auto_ptrIiEC1EPi
> 0188  S  26 RBR   14 ._ZNSt8auto_ptrIiED1Ev
> 0248  S  26 RBR   6  ._ZdlPv
> 
> Relocations for .data (16)
> vaddrsgn mod sz type  symndx symbol
> 12b8  U  32 POS   8  .text
> 12e0  U  32 POS   8  .text
> 1308  U  32 POS   30 .text
> 1330  U  32 POS   30 .text
> 1334  U  32 POS   10 ._Z3foov
> 1338  U  32 POS   0  TOC
> 1340  U  32 POS   12 ._ZNSt8auto_ptrIiEC1EPi
> 1344  U  32 POS   0  TOC
> 134c  U  32 POS   14 ._ZNSt8auto_ptrIiED1Ev
> 1350  U  32 POS   0  TOC
> 1358  U  32 POS   32 ._Z3barv
> 135c  U  32 POS   0  TOC
> 1364  U  32 POS   12 ._ZNSt8auto_ptrIiEC1EPi
> 1368  U  32 POS   0  TOC
> 1370  U  32 POS   14 ._ZNSt8auto_ptrIiED1Ev
> 1374  U  32 POS   0  TOC
> 
> TOC:
> 137c  TOC
> Nbr entries: 1Size:  (0)
> 
> The output from objdump --private=relocs also contains the failing 0x1364
> RLD address now:
> 
> 1364  U  32 POS   12 ._ZNSt8auto_ptrIiEC1EPi



sandbox@rs6k> c++filt _ZNSt8auto_ptrIiEC1EPi
std::auto_ptr::auto_ptr(int*)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


Re: gold mistreats -Wl,-Ttext,0x8200

2012-03-10 Thread Ian Lance Taylor
"Vladimir 'φ-coder/phcoder' Serbinenko"  writes:

> Namely the minimal testcase is:
> gcc -o 1.img -ffreestanding -Wl,-Ttext,0x8200 1.S -nostdlib -m32
> The resulting file has .text at 9200 and not 8200
> 1.S:
> .text
>
> .globl _start
> _start:

Thanks for the report.  For gold the -Ttext option sets the address of
the text segment, not the .text section.  When I try your test case with
current gold the text segment does indeed start at 0x8200, as expected.

Ian

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


Re: gold mistreats -Wl,-Ttext,0x8200

2012-03-10 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 10.03.2012 19:19, Ian Lance Taylor wrote:
> "Vladimir 'φ-coder/phcoder' Serbinenko"  writes:
>
>> Namely the minimal testcase is:
>> gcc -o 1.img -ffreestanding -Wl,-Ttext,0x8200 1.S -nostdlib -m32
>> The resulting file has .text at 9200 and not 8200
>> 1.S:
>> .text
>>
>> .globl _start
>> _start:
> Thanks for the report.  For gold the -Ttext option sets the address of
> the text segment, not the .text section.  When I try your test case with
> current gold the text segment does indeed start at 0x8200, as expected.
That difference with BFD is annoying. In GRUB we need to use the exact
address for .text.
> Ian
>


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko




signature.asc
Description: OpenPGP digital signature
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils