llvm-project/lld/test/MachO/invalid
Nico Weber 062c660dbf [lld/mac] With -demangle, strip leading _ from non-mangled names
For

    void f();
    int main() { f(); }

`lld -demangle` now produces

    ld64.lld: error: undefined symbol: f
    >>> referenced by path/to/main.o:(symbol main+0x8)

instead of

    ld64.lld: error: undefined symbol: _f
    >>> referenced by path/to/main.o:(symbol _main+0x8)

previously. (Without `-demangle`, it still prints `_f` and `_main`.)

This does *not* match ld64's behavior, but it does match e.g. lld/COFF's
behaviour.

This is arguably easier to understand: clang prepends symbol names with `_`
on macOS, so it seems friendly if the linker removes it again in its
diagnostics. It also makes the `extern "C"` insertion diagnostics we added
recently look more self-consistent.

Differential Revision: https://reviews.llvm.org/D135189
2022-10-04 16:47:07 -04:00
..
Inputs
alignment-too-large.yaml
archive-no-index.s
arm64-thunk-undefined.s
arm64-unaligned-load.s [lld-macho] Diagnose unaligned arm64 PAGEOFF12 relocations 2022-09-05 16:58:51 +02:00
bad-archive-member.s
bad-archive.s [lld] Add test suite mode for running LLD main twice 2021-11-01 14:26:54 -07:00
bad-got-to-dylib-tlv-reference.s [lld-macho] Include address offsets in error messages 2022-02-07 21:06:18 -05:00
bad-got-to-tlv-reference.s [lld-macho] Include address offsets in error messages 2022-02-07 21:06:18 -05:00
bad-tlv-def.s
bad-tlv-opcode.s
bad-tlv-relocation.s [lld-macho] Include address offsets in error messages 2022-02-07 21:06:18 -05:00
cfstring.s [lld-macho] Associate compact unwind entries with function symbols 2021-10-26 16:04:15 -04:00
chained-fixups-incompatible.s [lld-macho] Add support for emitting chained fixups 2022-10-04 11:48:45 +02:00
compact-unwind-bad-reloc.s [lld-macho] Use fewer indirections in UnwindInfo implementation 2022-04-08 23:49:07 -04:00
compact-unwind-personalities.s [lld-macho][nfc] Remove unnecessary -pie flags in tests 2021-11-04 00:02:03 -04:00
cstring-dedup.s [lld-macho] Include address offsets in error messages 2022-02-07 21:06:18 -05:00
dso-handle-duplicate.s
duplicate-symbol-debug.s [lld-macho] Use source information in duplicate symbol errors 2022-06-23 11:07:15 -04:00
duplicate-symbol.ll
duplicate-symbol.s [lld/mac] With -demangle, strip leading _ from non-mangled names 2022-10-04 16:47:07 -04:00
eh-frame.s [lld-macho][reland] Initial support for EH Frames 2022-06-13 07:45:16 -04:00
incompatible-arch.s [lld/mac] Warn that writing zippered outputs isn't implemented 2022-04-21 12:05:56 -04:00
incompatible-target-tapi.test [lld/mac] Warn that writing zippered outputs isn't implemented 2022-04-21 12:05:56 -04:00
invalid-executable.s
invalid-fat-narch.s
invalid-fat-offset.s
invalid-loh.s [lld-macho] Parallelize linker optimization hint processing 2022-09-16 17:38:46 +02:00
invalid-lto-object-path.ll [lld-macho] Handle filename being passed in -lto_object_path 2022-07-16 21:46:47 +02:00
invalid-relocation-length.yaml
invalid-relocation-pcrel.yaml
invalid-stub.s [lld-macho] Fix crash on invalid framework tbd 2022-04-22 10:26:48 -07:00
lto-bitcode-nodatalayout.ll [lld] Add test suite mode for running LLD main twice 2021-11-01 14:26:54 -07:00
missing-dylib.s
no-filelist.s
no-id-dylink.yaml
no-libxar.ll
no-such-file.s
protected.ll
range-check.s [lld-macho] Fix symbol name returned from InputSection::getLocation 2022-06-13 15:49:27 -04:00
reserved-section-name.s [lld] Add test suite mode for running LLD main twice 2021-11-01 14:26:54 -07:00
stub-link.s [lld-macho][nfc] Centralize usages of ld64.lld in tests 2022-02-10 17:27:07 -08:00
undef-debug.s Reland "[lld-macho] Show source information for undefined references" 2022-06-21 18:50:06 -04:00
undef-multi.s Reland "[lld-macho] Group undefined symbol diagnostics by symbol". 2022-06-15 19:22:39 -04:00
undefined-symbol.s [lld/mac] With -demangle, strip leading _ from non-mangled names 2022-10-04 16:47:07 -04:00