[llvm-bugs] [Bug 50576] New: lld/mac's LC_FUNCTION_STARTS section is all wrong
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jun 3 12:48:03 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=50576
Bug ID: 50576
Summary: lld/mac's LC_FUNCTION_STARTS section is all wrong
Product: lld
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: MachO
Assignee: unassignedbugs at nondot.org
Reporter: nicolasweber at gmx.de
CC: gkm at fb.com, jezreel at gmail.com,
llvm-bugs at lists.llvm.org, smeenai at fb.com
1. Download repro zip from https://bugs.llvm.org/show_bug.cgi?id=48657#c0
2. Link
3. `xcrun dyldinfo -function_starts Chromium.app/Contents/Frameworks/Chromium\
Framework.framework/Versions/Current/Chromium\ Framework | head -1`
Works fine when linking with ld64, prints garbage with lld. ld64:
% xcrun dyldinfo -function_starts Chromium.app/Contents/Frameworks/Chromium\
Framework.framework/Versions/Current/Chromium\ Framework | head -10
0x3B00 _ChromeAppModeStart_v6
0x4880 _ChromeMain
0x49E0 __ZN25ChromeCrashReporterClient6CreateEv
0x4B80 __ZN25ChromeCrashReporterClientD1Ev
0x4B90 __ZN25ChromeCrashReporterClientD0Ev
0x4BB0
__ZN25ChromeCrashReporterClient20GetCrashDumpLocationEPN4base8FilePathE
0x4BC0
__ZN25ChromeCrashReporterClient23GetCrashMetricsLocationEPN4base8FilePathE
0x4BD0 __ZN25ChromeCrashReporterClient19IsRunningUnattendedEv
0x4C40 __ZN25ChromeCrashReporterClient22GetCollectStatsConsentEv
0x4CD0
__ZN25ChromeCrashReporterClient24EnableBreakpadForProcessERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE
lld:
0x10B2460 __ZN14crash_reporter19CrashReporterClient12GetUploadUrlEv
0x10B2458 ?
0x10B2450
__ZN14crash_reporter19CrashReporterClient27ReportingIsEnforcedByPolicyEPb
0x10B2460 __ZN14crash_reporter19CrashReporterClient12GetUploadUrlEv
0x10B2458 ?
0x10B2450
__ZN14crash_reporter19CrashReporterClient27ReportingIsEnforcedByPolicyEPb
0x10B2510 ?
0x4239830 ?
0x423E8E0 ?
0x4274C90 ?
Also, the section is over 1 MB smaller with ld64:
% otool -l Chromium.app/Contents/Frameworks/Chromium\
Framework.framework/Versions/Current/Chromium\ Framework | grep -A3 LC_FUN
cmd LC_FUNCTION_STARTS
cmdsize 16
dataoff 171232496
datasize 838208
vs with lld:
% otool -l Chromium.app/Contents/Frameworks/Chromium\
Framework.framework/Versions/Current/Chromium\ Framework | grep -A3 LC_FUN
cmd LC_FUNCTION_STARTS
cmdsize 16
dataoff 183842744
datasize 2003880
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210603/40d317d1/attachment.html>
More information about the llvm-bugs
mailing list