[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/30623] New: objcopy --set-section-flags: support toggling
From: |
i at maskray dot me |
Subject: |
[Bug binutils/30623] New: objcopy --set-section-flags: support toggling a flag |
Date: |
Sat, 08 Jul 2023 05:48:43 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=30623
Bug ID: 30623
Summary: objcopy --set-section-flags: support toggling a flag
Product: binutils
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: i at maskray dot me
Target Milestone: ---
It will be more convenient if --set-section-flags supports toggling a flag,
instead of specifying the full set of flags, e.g.
--set-section-flags .foo=-alloc
--set-section-flags .foo=-readonly
--set-section-flags .foo=+readonly
The lack of toggling flags is currently not so cumbersome because most ELF
sections only use "alloc" and "readonly".
However, if we consider more flags, e.g. "exclude", "large"
(https://sourceware.org/bugzilla/show_bug.cgi?id=30592), the lack of toggling
flags is quite inconvenient.
For example, if we want to add SHF_X86_64_LARGE to large data sections, we need
to figure out whether "readonly" is set.
--set-section-flags .ldata=alloc,large
--set-section-flags .lrodata=alloc,readonly,large
It will be more convenient if we can just use
--set-section-flags .ldata=+large
--set-section-flags .lrodata=+large
Candidate syntax: the right hand side of `=` can use one of the two forms:
* comma separated flags, e.g. alloc,large
* comma separated + flags and - flags, e.g. -alloc,+readonly
Other forms like -alloc,readonly probably should be rejected.
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug binutils/30623] New: objcopy --set-section-flags: support toggling a flag,
i at maskray dot me <=