17 Commits

Author SHA1 Message Date
Jakub Konka
eb5d67b146 Merge pull request #19714 from ziglang/elf-merge-strings
link/elf: implement string merging
2024-04-23 17:14:03 -07:00
Jakub Konka
a94d5895cf elf: do not prealloc input objects, pread selectively 2024-02-12 23:07:51 +01:00
David Rubin
9097bcc06e add SHT_NOBITS check 2024-01-15 05:27:54 +01:00
Andrew Kelley
4629708787 linker: fix some allocator references 2024-01-01 17:51:20 -07:00
Andrew Kelley
5a6a1f8a8a linker: update target references 2024-01-01 17:51:19 -07:00
Jakub Konka
e349bb2b66 elf: upcast e_shnum to u64 to check for valid ranges 2023-12-05 14:27:03 +01:00
Jakub Konka
52959bba7c elf: re-instate basic error reporting for LD script parser 2023-12-05 14:08:04 +01:00
Jakub Konka
2e1dd1e554 elf: move basic parse error reporting to SharedObject 2023-12-05 13:53:11 +01:00
Jakub Konka
6f3bbd5eaa elf: we were writing too many symbols in the symtab 2023-11-15 19:00:13 +01:00
Jakub Konka
5e78600f0f elf: actually track output symtab index of symbols 2023-11-07 23:18:41 +01:00
Jakub Konka
5c48236103 elf: init objects after parsing them 2023-11-05 12:37:15 +01:00
Jakub Konka
25c53f08a6 elf: redo strings management in the linker
* atom names - are stored locally and pulled from defining object's
  strtab
* local symbols - same
* global symbols - in principle, we could store them locally, but
  for better debugging experience - when things go wrong - we
  store the offsets in a global strtab used by the symbol resolver
2023-11-04 09:08:16 +01:00
Jakub Konka
8087ec8e8c elf: improve parsing of ld scripts and actually test linking against them 2023-10-24 19:03:00 +02:00
Jakub Konka
52e0ca1312 elf: parse GNU ld script as system lib indirection 2023-10-18 13:54:43 +02:00
Jakub Konka
d2727b808c elf: fix 32bit build 2023-10-16 19:56:47 +02:00
Jakub Konka
5fa90afb64 elf: fix synthetic section handling and actually parse DSOs 2023-10-16 19:33:04 +02:00
Jakub Konka
d1446565a1 elf: re-enable dynamic linking codepaths 2023-10-16 19:33:04 +02:00