Skip to content

Conversation

@RealA10N
Copy link
Owner

No description provided.

@RealA10N RealA10N self-assigned this Apr 27, 2025
@RealA10N RealA10N requested a review from Copilot April 27, 2025 20:01
@codecov
Copy link

codecov bot commented Apr 27, 2025

Codecov Report

Attention: Patch coverage is 0% with 39 lines in your changes missing coverage. Please review.

Project coverage is 42.32%. Comparing base (6cbf2ca) to head (dd8855f).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
aarch64/isa/bl.go 0.00% 19 Missing ⚠️
aarch64/codegen/file.go 0.00% 12 Missing ⚠️
aarch64/translation/file.go 0.00% 6 Missing ⚠️
aarch64/codegen/instruction.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #46      +/-   ##
==========================================
- Coverage   42.60%   42.32%   -0.28%     
==========================================
  Files         114      114              
  Lines        4253     4281      +28     
==========================================
  Hits         1812     1812              
- Misses       2355     2383      +28     
  Partials       86       86              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request introduces support for Aarch64 extern functions by updating symbol handling, branch relocation registration, and file code generation context.

  • Conditionally set symbol properties for defined functions in the translation phase.
  • Register relocations for branch instructions when target offsets are unavailable.
  • Add helper methods for computing instruction offsets and manage function indices and relocations in file codegen.

Reviewed Changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.

File Description
aarch64/translation/file.go Updates symbol creation to conditionally set section and offset for defined functions.
aarch64/isa/bl.go Adds relocation registration and updates branch instruction generation.
aarch64/codegen/instruction.go Introduces a helper to compute instruction offset in file.
aarch64/codegen/file.go Enhances file codegen context with function indices and relocations management.
Files not reviewed (2)
  • examples/aarch64/bl-extern.usm: Language not supported
  • go.mod: Language not supported
Comments suppressed due to low confidence (2)

aarch64/translation/file.go:37

  • The conditional update of symbol properties for defined functions may leave undefined symbols with zero or uninitialized section and offset values; please confirm that this behavior is intentional and that it will not adversely affect symbol resolution.
if function.IsDefined() {

aarch64/isa/bl.go:43

  • Returning a BL(0) placeholder when the target offset lookup fails could inadvertently introduce an incorrect branch target; consider defining a clear fallback strategy or documenting why BL(0) is safe in this context.
targetOffset, ok := ctx.FunctionOffsets[b.Target]

@RealA10N RealA10N merged commit da3139b into main Apr 27, 2025
3 checks passed
@RealA10N RealA10N deleted the macho-extern-functions branch April 27, 2025 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants