23 Commits

Author SHA1 Message Date
Erik Hugne
f7bc8900bf std.coff: parse out codebase and entrypoint from optionalheader 2022-04-28 18:31:20 +03:00
Jakub Konka
28ca203b71 debug: fix resource (de)allocation for Elf and Coff targets
With this change, it is now possible to safely call
`var di = std.debug.openSelfDebugInfo(gpa)`. Calling then
`di.deinit()` on the object will correctly free all allocated
resources.

Ensure we store the result of `mmap` with correct alignment.
2022-04-21 11:48:15 +02:00
Tom Maenan Read Cutting
9bb19a090e std: Add elf.EM, coff.MachineType to Target.CPU.Arch conversions
target.Arch already supports finding the correct encoding for either
target, so being able to do the inverse has use cases for when parsing
files of an unknown target (i.e. for zar).
2022-03-15 13:48:42 -04:00
Lee Cannon
85de022c56
allocgate: std Allocator interface refactor 2021-11-30 23:32:47 +00:00
Ryan Liptak
a343758141 Update ensureTotalCapacity to ensureTotalCapacityPrecise where it makes sense
These calls are all late-initialization of ArrayList's that were initialized outside the current scope. This allows us to still get the potential memory-saving benefits of the 'precision' of initCapacity.
2021-11-01 00:57:33 -07:00
Andrew Kelley
6115cf2240 migrate from std.Target.current to @import("builtin").target
closes #9388
closes #9321
2021-10-04 23:48:55 -07:00
Ryan Liptak
59f5053bed Update all ensureCapacity calls to the relevant non-deprecated version 2021-09-19 13:52:56 +02:00
Andrew Kelley
d29871977f remove redundant license headers from zig standard library
We already have a LICENSE file that covers the Zig Standard Library. We
no longer need to remind everyone that the license is MIT in every single
file.

Previously this was introduced to clarify the situation for a fork of
Zig that made Zig's LICENSE file harder to find, and replaced it with
their own license that required annual payments to their company.
However that fork now appears to be dead. So there is no need to
reinforce the copyright notice in every single file.
2021-08-24 12:25:09 -07:00
Matt Chudleigh
a6c2e44ae7 Add support for reading DWARF debug information from COFF files 2021-06-18 16:19:20 -07:00
Matt Chudleigh
2dcdaa7668 Support long section names in COFF files 2021-06-18 16:19:20 -07:00
Andrew Kelley
429cd2b5dd std: change @import("builtin") to std.builtin 2021-04-15 19:06:39 -07:00
Andrew Kelley
5f35dc0c0d zig fmt the std lib 2021-02-24 21:29:23 -07:00
Jay Petacat
a9b505fa77 Reduce use of deprecated IO types
Related: #4917
2021-01-07 23:48:58 -08:00
Frank Denis
6c2e0c2046 Year++ 2020-12-31 15:45:24 -08:00
Josh Holland
c25b157dda remove deprecated uses of ArrayList.span 2020-11-07 11:15:44 +00:00
Alexandros Naskos
e9b137f23a Completed basic PE linker for stage2
Added std.coff.MachineType
Added image characteristic and section flag valued to std.coff
Added std.Target.Cpu.Arch.toCoffMachine
Fixed stage2 --watch flag on windows
2020-09-04 05:15:03 +03:00
Andrew Kelley
4a69b11e74 add license header to all std lib files
add SPDX license identifier
copyright ownership is zig contributors
2020-08-20 16:07:04 -04:00
xackus
7a28c644aa new ArrayList API: fix everything else 2020-04-02 16:12:08 +02:00
Andrew Kelley
9e7ae06249
std lib API deprecations for the upcoming 0.6.0 release
See #3811
2020-03-30 14:23:22 -04:00
Andrew Kelley
2bff0dda79
fix regressions found by test suite 2020-03-10 20:22:30 -04:00
Andrew Kelley
d87b13f2f7
fix windows std lib regressions 2019-11-29 21:55:27 -05:00
Vexu
4e6c1b676b
add cast to not hit #2561 2019-11-21 23:21:51 -05:00
Andrew Kelley
ed36dbbd9c
mv std/ lib/
that's all this commit does. further commits will fix cli flags and
such.

see #2221
2019-09-25 23:35:41 -04:00