llvm-project/lld/test
Sam Clegg cd01430ff1 [lld][WebAssembly] Allow data symbols to extend past end of segment
This fixes a bug with string merging with string symbols that contain
NULLs, as is the case in the `merge-string.s` test.

The bug only showed when we run with `--relocatable` and then try read
the resulting object back in.  In this case we would end up with string
symbols that extend past the end of the segment in which they live.

The problem comes from the fact that sections which are flagged as
string mergable assume that all strings are NULL terminated.  The
merging algorithm will drop trailing chars that follow a NULL since they
are essentially unreachable.  However, the "size" attribute (in the
symbol table) of such a truncated symbol is not updated resulting a
symbol size that can overlap the end of the segment.

I verified that this can happen in ELF too given the right conditions
and the its harmless enough.  In practice Strings that contain embedded
null should not be part of a mergable section.

Differential Revision: https://reviews.llvm.org/D102281
2021-05-12 13:43:37 -07:00
..
COFF [LLD] [COFF] Fix including the personality function for DWARF EH when linking with --gc-sections 2021-05-12 22:23:01 +03:00
ELF [LLD] Improve reporting unresolved symbols in shared libraries 2021-05-11 12:48:29 +07:00
MachO [lld-macho] Implement branch-range-extension thunks 2021-05-12 09:44:58 -07:00
MinGW [LLD] [MinGW] Pass the --demangle and --no-demangle options to the COFF linker 2021-01-07 10:02:19 +02:00
Unit Support multi-configuration generators correctly in several config files 2021-02-11 09:32:20 -08:00
darwin [lld-macho] Switch default to new Darwin backend 2021-03-01 12:30:10 -05:00
mach-o [lld-macho] Switch default to new Darwin backend 2021-03-01 12:30:10 -05:00
wasm [lld][WebAssembly] Allow data symbols to extend past end of segment 2021-05-12 13:43:37 -07:00
CMakeLists.txt [lld-macho] Add llvm-otool as a test dependency 2021-05-09 21:12:58 -04:00
lit.cfg.py [lld-macho] Initial groundwork for -bitcode_bundle 2021-04-16 16:47:14 -04:00
lit.site.cfg.py.in [lld-macho] Initial groundwork for -bitcode_bundle 2021-04-16 16:47:14 -04:00