[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/30254] iostream crashes with ld linker for windows targets
From: |
euloanty at live dot com |
Subject: |
[Bug ld/30254] iostream crashes with ld linker for windows targets |
Date: |
Sun, 21 May 2023 08:11:14 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=30254
--- Comment #11 from cqwrteur <euloanty at live dot com> ---
Here is the disassembly result from IDA pro.
.text:0000000140001540 ; =============== S U B R
O U T I N E =======================================
.text:0000000140001540
.text:0000000140001540 ; Attributes: bp-based
frame
.text:0000000140001540
.text:0000000140001540 ; int __cdecl main()
.text:0000000140001540 main proc near
; CODE XREF: __tmainCRTStartup+169↑p
.text:0000000140001540
; DATA XREF: .pdata:0000000140007084↓o
.text:0000000140001540 55 push rbp
.text:0000000140001541 48 89 E5 mov rbp, rsp
.text:0000000140001544 48 83 EC 20 sub rsp, 20h
.text:0000000140001548 ; #line 4
.text:0000000140001548 E8 F3 00 00 00 call __main
.text:0000000140001548
.text:000000014000154D ; #line 5
.text:000000014000154D 48 8D 05 4C 1C 00 00 lea rax, aHelloWorld
; "Hello World\n"
.text:0000000140001554 48 89 C2 mov rdx, rax
.text:0000000140001557 48 8B 05 52 1C 00 00 mov rax,
cs:off_1400031B0
.text:000000014000155E 48 89 C1 mov rcx, rax
.text:0000000140001561 E8 1A 00 00 00 call
_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc ;
std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
.text:0000000140001561
.text:0000000140001566 ; #line 6
.text:0000000140001566 B8 00 00 00 00 mov eax, 0
.text:000000014000156B 48 83 C4 20 add rsp, 20h
.text:000000014000156F 5D pop rbp
.text:0000000140001570 C3 retn
.text:0000000140001570
.text:0000000140001570 main endp
.text:0000000140001570
.text:0000000140001570 ;
---------------------------------------------------------------------------
.text:0000000140001571 ; #line 6
.text:0000000140001571 algn_140001571:
; DATA XREF: .pdata:0000000140007084↓o
.text:0000000140001571 90 90 90 90 90 90 90 90 90 90+align 20h
.text:0000000140001580 ; [00000006 BYTES:
COLLAPSED FUNCTION std::operator<<<std::char_traits<char>>(std::ostream &,char
const*). PRESS CTRL-NUMPAD+ TO EXPAND]
.text:0000000140001586 90 90 align 8
.text:0000000140001588 FF 25 D2 28 00 00 jmp
cs:_ZSt21ios_base_library_initv ; std::ios_base_library_init(void)
.text:0000000140001588
.text:0000000140001588 ;
---------------------------------------------------------------------------
.text:000000014000158E 90 90 align 10h
.text:0000000140001590 ; #line 21
We can see .pdata:0000000140007084 has a link to std::ios_base_library_init in
libstdc++-6.dll for LLVM lld. However, GNU ld does not do the right thing at
here. It looks like a serious bug in the linker.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/30254] iostream crashes with ld linker for windows targets, (continued)
- [Bug ld/30254] iostream crashes with ld linker for windows targets, euloanty at live dot com, 2023/05/20
- [Bug ld/30254] iostream crashes with ld linker for windows targets, euloanty at live dot com, 2023/05/20
- [Bug ld/30254] iostream crashes with ld linker for windows targets, euloanty at live dot com, 2023/05/20
- [Bug ld/30254] iostream crashes with ld linker for windows targets, euloanty at live dot com, 2023/05/21
- [Bug ld/30254] iostream crashes with ld linker for windows targets, euloanty at live dot com, 2023/05/21
- [Bug ld/30254] iostream crashes with ld linker for windows targets, euloanty at live dot com, 2023/05/21
- [Bug ld/30254] iostream crashes with ld linker for windows targets, euloanty at live dot com, 2023/05/21
- [Bug ld/30254] iostream crashes with ld linker for windows targets, euloanty at live dot com, 2023/05/21
- [Bug ld/30254] iostream crashes with ld linker for windows targets, euloanty at live dot com, 2023/05/21
- [Bug ld/30254] iostream crashes with ld linker for windows targets, euloanty at live dot com, 2023/05/21
- [Bug ld/30254] iostream crashes with ld linker for windows targets,
euloanty at live dot com <=
- [Bug ld/30254] iostream crashes with ld linker for windows targets, euloanty at live dot com, 2023/05/21
- [Bug ld/30254] iostream crashes with ld linker for windows targets, euloanty at live dot com, 2023/05/21
- [Bug ld/30254] iostream crashes with ld linker for windows targets, euloanty at live dot com, 2023/05/21
- [Bug ld/30254] iostream crashes with ld linker for windows targets, euloanty at live dot com, 2023/05/21
- [Bug ld/30254] iostream crashes with ld linker for windows targets, euloanty at live dot com, 2023/05/21
- [Bug ld/30254] iostream crashes with ld linker for windows targets, euloanty at live dot com, 2023/05/21
- [Bug ld/30254] iostream crashes with ld linker for windows targets, euloanty at live dot com, 2023/05/21