Skip to content
Commit 00413821 authored by Guilhem's avatar Guilhem Committed by Derek Schuff
Browse files

[llvm-objcopy] Fix --section-add when section contain empty bytes

Implicit cast between char* and StringRef when writing sections.

Reproduce:
```
$> llvm-objcopy --dump-section=name=name.data out.wasm
$> llvm-objcopy --remove-section=name out.wasm out_no_name.wasm
$> llvm-objcopy --add-section=name=name.data out_no_name.wasm out_new_name.wasm

# With wasm-objdump -h we can see that the name section is not totally copied in the new wasm file (if it actually contain empty bytes)

```

Reviewed By: dschuff

Differential Revision: https://reviews.llvm.org/D139210
parent fccab9f9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment