Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aot_resolve_target_info: avoid in-place modification of e_type #3564

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

yamt
Copy link
Collaborator

@yamt yamt commented Jun 24, 2024

  • I believe that LLVM MemoryBuffer interface is supposed to be read-only and it's allowed to use eg. read-only mmap of the underlying file. It isn't appropriate to modify the view at all.

  • in case of WASM_ENABLE_DEBUG_AOT, the whole buffer is written as the text section of the aot file. the modified e_type would confuse dwarf consumers. note that, even when we are using XIP, the debug info usually contains relocations. for example, llvm-dwarfdump doesn't seem to perform relocations on .debug_info section for ET_CORE (== 4 == our E_TYPE_XIP) objects.

* I believe that LLVM MemoryBuffer interface is supposed to be read-only
  and it's allowed to use eg. read-only mmap of the underlying file.
  It isn't appropriate to modify the view at all.

* in case of WASM_ENABLE_DEBUG_AOT, the whole buffer is written as the text
  section of the aot file. the modified e_type would confuse dwarf consumers.
  note that, even when we are using XIP, the debug info usually contains
  relocations. for example, llvm-dwarfdump doesn't seem to perform relocations
  on .debug_info section for ET_CORE (== 4 == our E_TYPE_XIP) objects.
@TianlongLiang
Copy link
Contributor

LGTM

@wenyongh wenyongh merged commit e66b414 into bytecodealliance:main Jun 25, 2024
378 checks passed
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.

3 participants