ld: Fix remapping of FDEs with multiple CFIs #343

Merged
sb10q merged 1 commits from fix/ld-remap-multiple-cie into master 2024-08-17 17:37:20 +08:00
Collaborator

The previous implementation assumes that each .eh_frame section will only contain one CFI (and hence one CIE) record, but this is shown not to hold when compiling with no optimizations.

This PR fixes that by refactoring the parsing and handling of records in the .eh_frame section, such that multiple CFIs within .eh_frame is properly handled. This PR also refactors the reading of CFI/CIE/FDE into a hierarchical manner.

The previous implementation assumes that each `.eh_frame` section will only contain one CFI (and hence one CIE) record, but this is shown not to hold when compiling with no optimizations. This PR fixes that by refactoring the parsing and handling of records in the `.eh_frame` section, such that multiple CFIs within `.eh_frame` is properly handled. This PR also refactors the reading of CFI/CIE/FDE into a hierarchical manner.
derppening self-assigned this 2023-10-20 18:16:57 +08:00
derppening added 3 commits 2023-10-20 18:16:59 +08:00
e49b760e34 ld: Support multiple CFIs with different encoding in .eh_frame
We now parse each CFI to read its encoding as opposed to assuming that
all CFIs within the same EH_Frame uses the same encoding. FDEs are now
iterated in a per-CFI manner.
derppening requested review from sb10q 2023-10-20 18:17:04 +08:00
sb10q merged commit e49b760e34 into master 2023-10-20 18:18:40 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#343
No description provided.