Jakub Konka
da07251000
zld: make addend i64 in Signed reloc
2021-07-15 18:49:47 +02:00
Jakub Konka
496903c6a8
zld: add DICE support mainly for x86_64-macos
2021-07-15 18:49:47 +02:00
Jakub Konka
e3fe9a9df5
zld: fix parsing and resolving Signed relocs
...
on x86_64-macos since this an x86_64 only relocation type.
2021-07-15 18:49:47 +02:00
Jakub Konka
b8fce705ad
zld: refactor nlist and reloc filtering logic
2021-07-15 18:49:47 +02:00
Jakub Konka
2a880897b0
zld: add basic Signed reloc resolution
...
and fix handling Unsigned for x86_64.
2021-07-15 18:49:47 +02:00
Jakub Konka
570660bb46
zld: ___dso_handle is regular at 0x100000000
...
which points at the start of the __TEXT segment.
Also, ensure C++ initializers and terminators are rebased.
2021-07-15 18:49:47 +02:00
Jakub Konka
9e051e365b
zld: correctly estimate TextBlock's alignment with
...
section's alignment serving as the maximum alignment that
can be seen in this particular section. However, TextBlocks are
still allowed to have at most that alignment.
2021-07-15 18:49:47 +02:00
Jakub Konka
95aeb09b9b
zld: populate sections from the top rather than from bottom
2021-07-15 18:49:47 +02:00
Jakub Konka
714e0c4761
zld: re-enable logging of TextBlocks
2021-07-15 18:49:47 +02:00
Jakub Konka
7aefea614f
zld: fix allocating tentative defs
2021-07-15 18:49:47 +02:00
Jakub Konka
3bdb3b574e
zld: turn logging off
2021-07-15 18:49:47 +02:00
Jakub Konka
dd5c7588d1
zld: fix resolving TLV offset relocations
2021-07-15 18:49:47 +02:00
Jakub Konka
322be2698d
zld: TextBlock needs to be written to an aligend offset too
2021-07-15 18:49:47 +02:00
Jakub Konka
bb5b82cab9
zld: dedup symbols in the symbol table
2021-07-15 18:49:47 +02:00
Jakub Konka
0cc4938419
zld: re-enable all of linker after complete rewrite
2021-07-15 18:49:47 +02:00
Jakub Konka
12187586d1
zld: fix alloc alignment and resolve relocs
2021-07-15 18:49:47 +02:00
Jakub Konka
961b463fad
zld: track symbols defined within TextBlock
...
in case TextBlock represents an entire section with symbols
defined within.
2021-07-15 18:49:47 +02:00
Jakub Konka
7aeedc0912
zld: allocate TextBlocks
...
temporarily by iterating over all defined TextBlocks. However,
once we merge this with MachO incremental, updates will be done
at the point of creation and/or update.
Also, fix mining TLV knowledge for working out TLV pointers.
2021-07-15 18:49:47 +02:00
Jakub Konka
e524f43a6f
zld: save rebase and TLV offset as part of TextBlock
...
instead of as part of the Symbol. This seems to be more
optimal way of handling dyld ops in presence of no splittable
input sections in object files.
2021-07-15 18:49:47 +02:00
Jakub Konka
7c662db8d9
zld: keep text blocks per segment,section pair
2021-07-15 18:49:47 +02:00
Jakub Konka
a04bc1ed14
zld: update relocs and start prepping for segment allocs
2021-07-15 18:49:47 +02:00
Jakub Konka
dfa69e3c30
zld: dealloc TextBlock if omitted
2021-07-15 18:49:47 +02:00
Jakub Konka
555b66c255
zld: move should_rebase logic into Symbol
2021-07-15 18:49:47 +02:00
Jakub Konka
dbd2eb7c7f
zld: simplify relocation parsing
2021-07-15 18:49:47 +02:00
Jakub Konka
15b85df3dd
zld: parse relocs per generated TextBlock
2021-07-15 18:49:47 +02:00
Jakub Konka
54888c6f46
zld: create TextBlocks for tentative definitions
...
and fix the links in the `TextBlock`s linked list!
2021-07-15 18:49:47 +02:00
Jakub Konka
51e334af44
zld: refactor section into TextBlocks conversion
2021-07-15 18:49:47 +02:00
Jakub Konka
7b4063d558
zld: convert section in linked list of TextBlocks
2021-07-15 18:49:47 +02:00
Jakub Konka
5649242025
zld: draft up final format of TextBlock
2021-07-15 18:49:47 +02:00
Jakub Konka
5b3c4691e6
zld: put relocs in a TextBlock
2021-07-15 18:49:47 +02:00
Jakub Konka
453c16d8ac
zld: draft out splitting sections into blocks
2021-07-15 18:49:47 +02:00
Jakub Konka
669ac92af0
zld: fix ast errors
2021-07-15 18:49:47 +02:00
Jakub Konka
3bd9f38017
zld: reenable entire linker in the new scheme
...
without the stabs... They are tricky and need a bit more work.
2021-07-15 18:49:47 +02:00
Jakub Konka
7c82079d2c
zld: allocate symbols using the new scheme
2021-07-15 18:49:47 +02:00
Jakub Konka
ceb431507d
zld: resolve symbols in dylibs using new scheme
2021-07-15 18:49:47 +02:00
Jakub Konka
989639efba
zld: coalesce symbols on creation
2021-07-15 18:49:47 +02:00
Jakub Konka
980f2915fa
zld: use index to symbol in reloc
...
instead of pointer to the Symbol struct in the hope that we
can overwrite the Symbol in the object's symbol table with the
resolved Symbol later down the line.
2021-07-15 18:49:46 +02:00
Jakub Konka
ee6e25bc13
zld: add Symbol.Stab and move nlist creation logic there
2021-07-15 18:49:46 +02:00
Jakub Konka
2b3bda43e3
zld: abstract Symbol creation logic
2021-07-15 18:49:46 +02:00
Jakub Konka
3622fe08db
zld: abstract away string table with fewer allocs
2021-07-15 18:49:46 +02:00
Jakub Konka
9c3ebe0216
zld: clean up logic for creating mach header
2021-07-15 18:49:46 +02:00
Jakub Konka
e08f7ba889
zld: remove redundant codepaths
2021-07-15 18:49:46 +02:00
g-w1
ee173d5127
parser: require block in suspend expression
2021-07-15 10:55:22 +03:00
Ryan Liptak
4ea7470417
Add inotify_rm_watch definition to c/linux.zig
...
Also make inotify_add_watch's pathname marked as nul-terminated
2021-07-15 10:54:05 +03:00
Ryan Liptak
a84402d796
Add NotDir as possible error for os.inotify_add_watch
...
Possible when "mask contains IN_ONLYDIR and pathname is not a directory."
2021-07-15 10:51:25 +03:00
leesongun
132b18e2b3
Fix bigint_shl ( #9305 )
2021-07-13 10:16:57 +03:00
Jonathan Marler
9086452ff9
clarify @bitSizeOf behavior
2021-07-13 10:14:39 +03:00
Jacob G-W
74972531b5
fix doc comment in translate_c
2021-07-13 10:12:31 +03:00
Luna
3e8394776a
ci: enable netbsd tarballs
...
This reverts commit 3063f0a5ed
.
2021-07-12 21:44:38 -04:00
Andrew Kelley
9b79ce1cd3
Merge pull request #9365 from ifreund/hash-map-fix
...
std/hash_map: fix ensureUnusedCapacity() over-allocating
2021-07-12 18:21:19 -04:00