Rui Ueyama
610e839e9e
Fix ASAN issue
2022-06-15 13:12:09 +08:00
Rui Ueyama
dcbc85b412
Attempt to fix CI
2022-06-15 11:52:45 +08:00
Rui Ueyama
7133f8a547
Attempt to fix CI
2022-06-15 11:41:45 +08:00
Rui Ueyama
792773be20
Simplify
2022-06-15 10:40:38 +08:00
Rui Ueyama
13816a14e1
Merge pull request #538 from llunak/better-undefined
...
Better reporting of undefined symbols
2022-06-15 10:28:56 +08:00
Rui Ueyama
8f02509ba6
Print out an error message if mold -run
is used on macOS
2022-06-09 10:36:02 -07:00
Luboš Luňák
87163c667a
fix tests to work with new undefined references reporting
...
Signed-off-by: Luboš Luňák <l.lunak@centrum.cz>
2022-06-09 13:32:23 +02:00
Luboš Luňák
e45bebd1c7
group undefined symbols when reporting them ( #508 )
...
The output now roughly matches the lld report format, with
each symbol followed by a limited list of places that reference it.
Lld can additionally read debuginfo to report the exact location,
but that would require writing an interpreter for .debug_line.
Signed-off-by: Luboš Luňák <l.lunak@centrum.cz>
2022-06-09 12:40:09 +02:00
Luboš Luňák
d0cc19735d
report also the referencing function for undefined symbols
...
Signed-off-by: Luboš Luňák <l.lunak@centrum.cz>
2022-06-09 12:40:09 +02:00
Luboš Luňák
2c9e97c768
move duplicated symbol_strtab to base class InputFile
...
Signed-off-by: Luboš Luňák <l.lunak@centrum.cz>
2022-06-09 12:40:09 +02:00
Luboš Luňák
114cb8e9c8
report also source file name in undefined symbol reports
...
Signed-off-by: Luboš Luňák <l.lunak@centrum.cz>
2022-06-09 12:40:09 +02:00
Luboš Luňák
2af30acbb2
simplify opt_demangle setup
...
Setting it on demand is racy, and also not necessary, it's enough
to set it together with ctx.arg.demangle .
Signed-off-by: Luboš Luňák <l.lunak@centrum.cz>
2022-06-09 12:40:09 +02:00
Rui Ueyama
6f9eedf98a
[Mach-O] Fix an assertion failure
2022-06-07 20:15:47 +08:00
Rui Ueyama
e60bf30513
[Mach-O] Do not include duplicated symbols from re-exported libs
2022-06-07 14:46:16 +08:00
Rui Ueyama
610ce3c307
Refactor
2022-06-07 14:46:16 +08:00
Rui Ueyama
f3e1f728d3
[Mach-O] Add a hack to speed up code verification
2022-06-07 12:21:50 +08:00
Rui Ueyama
6f04ef9cf2
[Mach-O] Handle $ld$install_name$ symbols
2022-06-06 20:24:52 +08:00
Rui Ueyama
880204ebe5
[Mach-O] Handle $ld$hide$ symbols
2022-06-06 20:20:16 +08:00
Rui Ueyama
406d8786c9
Do not addd an element in a range-based loop
...
Adding a new element to a vector may invalidate existing iterators,
so it's not safe.
2022-06-06 20:10:30 +08:00
Rui Ueyama
e11e68d508
[Mach-O] Handle $ld$add$ symbols
2022-06-06 19:49:58 +08:00
Rui Ueyama
3af44d08db
Refactor
2022-06-06 18:52:14 +08:00
Rui Ueyama
d5b5b9afe1
[Mach-O] Handle $ld$previous$ symbols
2022-06-06 17:23:10 +08:00
Rui Ueyama
0b537ae54c
[Mach-O] Make -weak_framework to make framework weak
2022-06-06 14:19:24 +08:00
Rui Ueyama
b364b3f453
[Mach-O] Add -weak-l<LIB>
2022-06-06 14:02:28 +08:00
Rui Ueyama
ea31281149
Add tests
2022-06-06 12:03:01 +08:00
Rui Ueyama
ce34654924
Refactor
2022-06-06 10:34:20 +08:00
Rui Ueyama
2d34ba13cb
[Mach-O] Report errors in -{un,}exported_symbols_list early
2022-06-05 18:02:47 +08:00
Rui Ueyama
eee315ea52
[Mach-O] Allow glob patterns in -exported_symbols_list and -unexported_symbols_list
2022-06-05 17:47:42 +08:00
Rui Ueyama
d2d73cbcbc
Move glob pattern matchers out of elf directory
...
Because we want to use them in macho too.
2022-06-05 17:31:32 +08:00
Rui Ueyama
c786f55370
Style fix
2022-06-05 12:58:11 +08:00
Rui Ueyama
8ff4bd5e0f
[Mach-O] Ignore -order_file
2022-06-05 12:51:14 +08:00
Rui Ueyama
169a22d643
[Mach-O] Add -current_versin
2022-06-05 12:50:28 +08:00
Rui Ueyama
4a8cda75ad
[Mach-O] Add -compatibility_version
2022-06-05 12:48:54 +08:00
Rui Ueyama
1ebaf5be84
[Mach-O] Do not read the same .a more than once
2022-06-05 12:30:16 +08:00
Rui Ueyama
a05aae7d7a
Refactor
2022-06-05 11:45:45 +08:00
Rui Ueyama
f9ea7890a8
Remove dead code
2022-06-05 11:39:09 +08:00
Rui Ueyama
0488d95f38
Refactor
2022-06-05 11:34:13 +08:00
Rui Ueyama
6d0d19dffb
[Mach-O] Remove a hack for Chromium
2022-06-05 10:39:21 +08:00
Rui Ueyama
e3e0593162
[Mach-O] Recurse on re-exported libraries
2022-06-04 22:23:41 +08:00
Rui Ueyama
7511aee558
Refactor
2022-06-04 22:23:21 +08:00
Rui Ueyama
6a3c35d97c
[Mach-O] Add more hacks to link Chromium
2022-06-04 21:48:53 +08:00
Rui Ueyama
032b4d4cc5
Refactor
2022-06-04 21:10:52 +08:00
Rui Ueyama
3fb8b483b4
Fix CI
2022-06-04 20:31:09 +08:00
Rui Ueyama
e14788102c
[Mach-O] Fix dylib ordinal for flat-bounded symbols
2022-06-04 20:17:16 +08:00
Rui Ueyama
96d9859f45
[Mach-O] Add a workaround for linking Chrome
2022-06-04 20:17:16 +08:00
Rui Ueyama
56e6c038dc
[Mach-O] Fix a constant
2022-06-04 20:17:16 +08:00
Rui Ueyama
1f5da3d313
[Mach-O] Ignore comment lines in --exported_symbols_list file
2022-06-04 20:17:16 +08:00
Rui Ueyama
fc1aed3e99
[Mach-O] Load reexported libraries
2022-06-04 20:17:16 +08:00
Rui Ueyama
4b754348f5
[Mach-O] Support a local reference to a personality function
2022-06-04 20:17:16 +08:00
Rui Ueyama
eee1a87742
[Mach-O] Define -weak_framework as an alias for -framework for now
2022-06-04 20:17:16 +08:00