19 Commits

Author SHA1 Message Date
Andrew Kelley
49637f5372 objcopy: check both global and local when remapping 2024-10-12 10:44:17 -07:00
Andrew Kelley
9b0a3942ef objcopy: update for std.elf type safety
the new types make this code seem a bit strange
2024-10-12 10:44:17 -07:00
Alex Rønne Petersen
e6fd01a949
Merge pull request #21595 from alexrp/objcopy-seg-paddr
`objcopy`: Use `p_paddr` from `PT_LOAD` even if zero.
2024-10-05 05:21:48 +02:00
Alex Rønne Petersen
64b6a4ff77
objcopy: Use p_paddr from PT_LOAD even if zero.
Fix suggested by @cclin0816.

Closes #20019.
2024-10-04 22:44:49 +02:00
Patrick Wickenhaeuser
c3f1ff8b0d 19009: zig objcopy: minor cleanup 2024-10-04 15:49:50 +02:00
Patrick Wickenhaeuser
19a0864e4f 19009: zig objcopy: allow --add-section, --set-section-alignment and --set-section-flags only if the target is an ELF file 2024-10-04 15:49:50 +02:00
Patrick Wickenhaeuser
182c12de69 19009: zig objcopy: fix typo in abort messages 2024-10-04 15:49:50 +02:00
Patrick Wickenhaeuser
e1d54b6d1a 19009: zig objcopy: integrate --add-section, --set-section-alignment and --set-section-flags into std.Build.Step.ObjCopy 2024-10-04 15:49:50 +02:00
Patrick Wickenhaeuser
8f55efc1af 19009: zig objcopy: integrate section flags for --set-section-flags command 2024-10-04 15:49:50 +02:00
Patrick Wickenhaeuser
8cd7a9e5fc 19009: zig objcopy: parse section flags 2024-10-04 15:49:50 +02:00
Patrick Wickenhaeuser
caa699fc68 19009: zig objcopy: implement --set-section-alignment 2024-10-04 15:49:50 +02:00
Patrick Wickenhaeuser
f72961ee30 19009: add --set-section-alignment and --set-section-flags arguments to zig objcopy 2024-10-04 15:49:50 +02:00
Patrick Wickenhaeuser
172e7161a4 19009: zig objcopy: add --add-section support 2024-10-04 15:49:50 +02:00
Linus Groh
8588964972 Replace deprecated default initializations with decl literals 2024-09-12 16:01:23 +01:00
Robin Voetter
43f73af359
fix various issues related to Path handling in the compiler and std
A compilation build step for which the binary is not required could not
be compiled previously. There were 2 issues that caused this:

- The compiler communicated only the results of the emitted binary and
  did not properly communicate the result if the binary was not emitted.

  This is fixed by communicating the final hash of the artifact path (the
  hash of the corresponding /o/<hash> directory) and communicating this
  instead of the entire path. This changes the zig build --listen protocol
  to communicate hashes instead of paths, and emit_bin_path is accordingly
  renamed to emit_digest.

- There was an error related to the default llvm object path when
  CacheUse.Whole was selected. I'm not really sure why this didn't manifest
  when the binary is also emitted.

  This was fixed by improving the path handling related to flush() and
  emitLlvmObject().

In general, this commit also improves some of the path handling throughout
the compiler and standard library.
2024-08-19 19:09:11 +02:00
Andrew Kelley
768cb7e406 objcopy: use the fatal helper method 2024-07-12 00:14:08 -07:00
Nameless
aecd9cc6d1 std.posix.iovec: use .base and .len instead of .iov_base and .iov_len 2024-04-28 00:20:30 -07:00
Andrew Kelley
cd62005f19 extract std.posix from std.os
closes #5019
2024-03-19 11:45:09 -07:00
Andrew Kelley
33de937fd9 move zig objcopy command to be lazily built
part of #19063
2024-03-02 21:22:45 -08:00