-
Notifications
You must be signed in to change notification settings - Fork 2
riscv_gas_mapping_syms_fix_segemit
- Status: WITHDRAWN
(Nelson will fix the issue) - Branch:
riscv-gas-mapping-syms-fix-segemit - Tracking PR: #81 (view Pull Request and Diff)
- Mailing List:
- PATCH v1 (2022-10-28)
GAS incorrectly emits instruction mapping symbols without ISA string if no segments use two or more architectures simultaneously.
If no segments use two or more architectures (using .option directives), need_arch_map_symbol is not set to true, making riscv_check_mapping_symbols function to replace segment's mapping symbols ($x+arch) with $x.
This easily occurs when a segment (section) is surrounded by .option push / pop.
In this example, even when a non-default architecture is used by the program, $x+arch mapping symbol emission is suppressed unless the architecture is changed during a section so that two instructions in one section use the different architecture.
This commit renames need_arch_map_symbol to arch_changed_in_seg to reflect the actual role and suppresses $x+arch mapping symbol emission only if this variable is false (as before) and the section's architecture is the same as the default one (to be written as an ELF attribute).