Skip to content

read/elf: Exclude ARM mapping symbols from is_definition()#599

Closed
pcc wants to merge 1 commit intogimli-rs:masterfrom
pcc:mapping
Closed

read/elf: Exclude ARM mapping symbols from is_definition()#599
pcc wants to merge 1 commit intogimli-rs:masterfrom
pcc:mapping

Conversation

@pcc
Copy link
Copy Markdown
Contributor

@pcc pcc commented Nov 23, 2023

No description provided.

@philipc
Copy link
Copy Markdown
Contributor

philipc commented Nov 23, 2023

I agree this needs fixing, but I don't think we want to fix it with special case logic like this.

There's some previous discussion in #447, but I haven't gotten back to it yet to decide what to do.

@pcc
Copy link
Copy Markdown
Contributor Author

pcc commented Nov 23, 2023

I think most other tools just hardcode the exclusion for mapping symbols though, e.g. LLVM: https://github.com/llvm/llvm-project/blob/6b3470b4b83195aeeda60b101e8d3bf8800c321c/llvm/include/llvm/Object/ELFObjectFile.h#L742

It seems like the simplest approach and I think this is appropriate; mapping symbols are a bit of a hack (fortunately well defined by the various ABIs) and need to be countered with hacks in the consuming programs.

@philipc
Copy link
Copy Markdown
Contributor

philipc commented Nov 26, 2023

See the last commit of #601 for an alternative fix for this.

@philipc philipc closed this in #601 Nov 29, 2023
@philipc
Copy link
Copy Markdown
Contributor

philipc commented Mar 28, 2026

I think your fix here was better then #601, so I've opened #866 with you as co-author.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants