Commit Graph
100 Commits
Author SHA1 Message Date
Nikita Smith 61307aefbc reworked thread pool to share workers via semaphore 2025-01-21 01:55:13 -08:00
Nikita Smith 85ea141b83 minor fixes 2025-01-20 21:53:45 -08:00
Nikita Smith d3fbc858b8 impl shared thread pool mode 2025-01-20 21:41:24 -08:00
Nikita Smith e1e7fb745e win32 shared mutex impl and linux stubs 2025-01-20 21:36:43 -08:00
Nikita Smith 153bbc7b1d pass over COFF layer
- updated naming convention on structs, enums, and macros to conform with code base style
- moved related structs closer to each other
- moved parser code to separate file
2025-01-20 19:31:52 -08:00
Nikita Smith 269dc33985 set COMDAT selection on chunks created by import table 2025-01-18 23:21:06 -08:00
Nikita Smith a1d5837ff3 helpers for matching string literals 2025-01-18 17:39:11 -08:00
Nikita Smith 89ff4d0de2 on lambda types we have to replace unique name with hash,
otherwise visual studio wont show local variables in lambdas
2025-01-17 15:31:34 -08:00
Nikita Smith de2ea38f50 build file paths relative to image path 2025-01-16 14:03:14 -08:00
Nikita Smith b405ed4873 factored out logic for splitting function chunks into separate pass
over symbol table; associations are now assigned to sub chunks too;
inherit function chunk align from parent chunk
2025-01-16 13:47:13 -08:00
Nikita Smith c000817b9a pass over COFF symbol parser 2025-01-16 13:43:19 -08:00
Nikita Smith 190eb03ff3 removed default lib directive parser, moved directive code to obj file,
getting ready to deprecate LNK_Directive struct
2025-01-15 14:03:40 -08:00
Nikita Smith 1d6ee73409 handle zero sized array 2025-01-15 10:37:47 -08:00
Nikita Smith 1f8433096a COFF parser fixes 2025-01-15 10:25:16 -08:00
Nikita Smith 25f924b075 generate markers from RDI 2025-01-14 16:49:23 -08:00
Nikita Smith b889765c15 updated PE bin info to handle RDI entry, changed raddump to
convert and load RDI from memory, added helper for parsing debug directory
2025-01-14 16:49:05 -08:00
Nikita Smith b1c5b308c0 collect inline site name string 2025-01-14 10:42:22 -08:00
Nikita Smith 24efb574f1 factored out inline site decoder into stand alone helper so it can be
reused in the converter
2025-01-13 18:00:18 -08:00
Nikita Smith 3cec629a8c pipe obj directives through config path 2025-01-13 15:22:37 -08:00
Nikita Smith 076aa0a8cb build fixes for parse_inline_sites 2025-01-13 10:12:15 -08:00
Nikita Smith 30dc0340a4 print sizes in telemetry mark up in GSI build step 2025-01-08 03:26:04 -08:00
Nikita Smith 2b33978037 updated name convention for flag extract macro in CodeView layer 2025-01-08 03:26:04 -08:00
Nikita Smith 42e441541d fixes for LEB decode 2025-01-08 03:26:04 -08:00
Nikita Smith d0d1786cec define enum for image type 2025-01-08 03:26:04 -08:00
Nikita Smith 0d0a6d3980 fixed compile error in Linux entry point 2025-01-08 03:26:04 -08:00
Nikita Smith 98b9427446 dumper for Dwarf 2025-01-08 03:26:04 -08:00
Nikita Smith 543ee72f95 u64 array helper 2025-01-08 03:26:04 -08:00
Nikita Smith a5c9a1c978 u64 array sort 2025-01-08 03:26:04 -08:00
Nikita Smith b27b783e6f Dwarf parser WIP
Copied the parser from internal repo and integrated with the base layer
(not tested)

Parser uses based/range pattern for which we have an alternative in
string layer (str8_deserial_*)
2025-01-08 03:26:04 -08:00
Nikita Smith 76b742ceb8 coffdump -> raddump 2025-01-08 03:26:04 -08:00
Nikita Smith b6b64be867 moved enum handling code to separate files 2025-01-08 03:24:35 -08:00
Nikita Smith 3961f93d1a moved CodeView parser code into separate file 2025-01-08 03:24:35 -08:00
Nikita Smith be81533f63 removed coff guid and added missing defrange symbol 2025-01-08 03:24:35 -08:00
Nikita Smith 2a72f525fb added support for dumping disassembly and raw data out of sections 2024-12-11 12:07:42 -08:00
Nikita Smith c91253a19e move feature flags to appropriate layer 2024-12-10 14:07:51 -08:00
Nikita Smith 48cb999c3d format VC Features and COFF Group in debug directory 2024-12-10 13:47:47 -08:00
Nikita Smith 9ff49c33cc validate export table fields 2024-12-10 13:44:09 -08:00
Nikita Smith cd3fd4df16 format file preamble and warn about unknown argument 2024-12-09 17:16:44 -08:00
Nikita Smith dd3b4a025d advance offset 2024-12-09 15:49:34 -08:00
Nikita Smith aaa82af9b3 format base relocations 2024-12-09 15:25:12 -08:00
Nikita Smith db82b2ea63 remove dependency on bin info from base reloc parser 2024-12-09 15:24:18 -08:00
Nikita Smith 723c950c01 add default params for /FUNCTIONPADMIN 2024-12-09 14:27:03 -08:00
Nikita Smith 08a368dd66 handle ADDR32 base relocation 2024-12-06 15:35:33 -08:00
Nikita Smith f56bc209e0 minor fix 2024-12-06 14:39:00 -08:00
Nikita Smith b5273d6a00 keep parsing on encountering epilog opcode 2024-12-06 14:00:12 -08:00
Nikita Smith 6cf42338ba clang build fixes 2024-12-06 12:05:44 -08:00
Nikita Smith e73ce59945 WIP coffdump 2024-12-06 11:53:16 -08:00
Nikita Smith c3831e4350 WIP parser for MSVC C++ exceptions unwind info 2024-12-06 11:53:16 -08:00
Nikita Smith 0ea0820d19 minor fixes and cleanups 2024-12-06 11:53:16 -08:00
Nikita Smith 86db833a83 pass over PE
* upgraded PE with parsers for imports, exports, and tls
* added struct definitions for image load config and debug dir structs
2024-12-06 11:53:16 -08:00
Nikita Smith 80fa226432 pass over COFF archive parser 2024-12-06 11:53:16 -08:00
Nikita Smith 29de0c5a9e moved unsigned range list to base math 2024-12-06 11:53:16 -08:00
Nikita Smith d73e53a5b5 integer array structs 2024-12-06 11:53:16 -08:00
Nikita Smith 3851604705 32bit integer from ascii helpers 2024-12-06 11:53:16 -08:00
Nikita Smith 2bf3194cff disable .exp for radlink 2024-12-06 11:53:16 -08:00
Nikita Smith 669c03cff1 rename time -> time_stamp 2024-12-06 11:53:16 -08:00
Nikita Smith e22bd33275 pass over COFF, added symbol for function definitions, updated names
and types in structs, added enum to and from string helpers
2024-12-06 11:53:16 -08:00
Nikita Smith 53a5f6ab06 big-endian conversion helpers 2024-12-06 11:53:16 -08:00
Nikita Smith 746a2728b3 date time from unix time stamp 2024-12-06 11:53:16 -08:00
Nikita Smith 9ad63e45e6 u32 from string version 2024-12-06 11:53:16 -08:00
Nikita Smith 47ac1796a9 use build string literal from base context 2024-12-06 11:53:16 -08:00
Nikita Smith fc429449cf fix out of bounds check 2024-12-06 11:53:16 -08:00
Nikita Smith 19fac9b1aa changed symbol table parser to convert symbols as they are being read 2024-11-21 19:42:39 -08:00
Nikita Smith a0dbe72820 moved common codeview code to the main layer 2024-11-21 15:58:32 -08:00
Nikita Smith 7ac7bea420 minor fixes 2024-11-21 15:58:32 -08:00
Nikita Smith fbf180df2f assert when merging associative chunks 2024-11-21 13:30:13 -08:00
Nikita Smith 8e8924fcc6 minor fixes 2024-11-21 13:29:23 -08:00
Nikita Smith d9d0618e97 helpers for quickly checking presence of symbols and file paths in PDB 2024-11-21 01:05:33 -08:00
Nikita Smith a87e2745a4 GSI and String Table helpers 2024-11-21 01:05:33 -08:00
Nikita Smith bdb41aa040 fix off by one in GSI parser 2024-11-21 01:05:33 -08:00
Nikita Smith 714316aebf factor out stream table out of MSF parser 2024-11-21 01:05:33 -08:00
Nikita Smith c037d6ad75 WIP function padding 2024-11-21 01:05:33 -08:00
Nikita Smith 816d8e88bf remove warning pragma around radsort 2024-11-18 16:26:42 -08:00
Nikita Smith 31f536334e third party include fixups 2024-11-18 16:17:26 -08:00
Nikita Smith f0a1deec62 merge third party folders 2024-11-18 16:16:15 -08:00
Nikita Smith af57e321de show full lib path for better debuggability 2024-11-18 15:38:00 -08:00
Nikita Smith e44dd3aa07 instead of searching for manifest tool manually punt the job to CreateProcess 2024-11-18 15:38:00 -08:00
Nikita Smith 938be0aa84 changed string conversion routines to return null on null input
In os_process_launch on windows, linker relies on directory string conversion
to return null so CreateProcessW can set work directory itself.
2024-11-18 15:38:00 -08:00
Nikita Smith b99e10224f simplified chunk size tracking 2024-11-15 16:14:00 -08:00
Nikita Smith 435f6c4ef6 append .lib to defaultlibs 2024-11-15 16:14:00 -08:00
Nikita Smith b631d431fa create section layout without copying chunk data and perform chunk data
copy in parallel given layout
2024-11-15 16:14:00 -08:00
Nikita Smith 2562d04fbf changed build.bat to handle extra natvis for radlink and removed
'Unset' part since we use setlocal that prevents local variable
from leaking to the environment.
2024-11-15 16:14:00 -08:00
Nikita Smith b52a008748 remove debug trap 2024-11-15 16:14:00 -08:00
Nikita Smith b16d930d13 natvis for linker types 2024-11-15 16:14:00 -08:00
Nikita Smith a8b1805749 updated prof markup usage sites 2024-11-12 13:18:17 -08:00
Nikita Smith a8b2266fc0 added macro for sending notes to telemetry 2024-11-12 13:18:17 -08:00
Nikita Smith bc446d8520 dynamic profile zone with raddbg sprintf 2024-11-12 13:18:17 -08:00
Nikita Smith fd1906b034 safe cast commit size 2024-11-12 10:36:45 -08:00
Nikita Smith 2bbf3ff987 switch to data size formatter 2024-11-12 10:36:45 -08:00
Nikita Smith 880d7a4139 data size formatter for stb_sprintf 2024-11-12 10:36:45 -08:00
Nikita Smith c6caec657d moved cstring and find needle string ops to the main layer 2024-11-12 10:36:45 -08:00
Nikita Smith 3d7fc6fce5 moved memory and count string formatters to the main layer and
replaced str8_from_memory_size with more accurate data size units
2024-11-12 10:36:44 -08:00
Nikita Smith 0d0951bf08 squash some image-related steps into finalize image 2024-11-12 10:36:44 -08:00
Nikita Smith 3a190ae2c3 show an early warning for /DEBUG:FASTLINK 2024-11-12 10:36:44 -08:00
Nikita Smith bd4f82c8e8 cursed early return 2024-11-08 16:46:11 -08:00
Nikita Smith 680ea2ffdc added /RAD_IDLE_WORKERS 2024-11-08 16:09:56 -08:00
Nikita Smith f7d7f6633f expose file API to enable IO detouring 2024-11-08 16:09:56 -08:00
Nikita Smith 8e6a0ae4db errors and warnings fixes 2024-11-08 11:43:05 -08:00
Nikita Smith e297460697 add necessary Linux impls for linker
NOTE: Current OS API for semaphores doesn't work well with Linux/pthreads
way, for example, on Linux it's up to user program to allocate shared memory
and store there sem_t and detect when to release it. (Windows does this under
the hood when process that created shared semaphore exits)
2024-11-08 11:43:05 -08:00
Nikita Smith cf8c0e7442 clang and gcc bit ops 2024-11-08 11:43:05 -08:00