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

Add introspection for readelf #85298

Merged
merged 1 commit into from
Apr 26, 2023
Merged

Conversation

am11
Copy link
Member

@am11 am11 commented Apr 25, 2023

Just like CMAKE_NM, which is used by verify-entrypoints.sh, introspect CMAKE_READELF for genmoduleindex.sh.

I saw some warnings in riscv64 logs in @clamp03's PR #85289. Those warnings are reported by binutils readelf, which doesn't seem to handle DWARF 5 very well:

2023-04-25T06:24:05.8822869Z [ 96%] Generating coreclr module index file -> /__w/1/s/artifacts/obj/coreclr/linux.riscv64.Checked/debug/runtimeinfo/runtimemoduleindex.h
2023-04-25T06:24:05.9454927Z readelf: Warning: Unrecognized form: 0x23
2023-04-25T06:24:05.9574180Z readelf: Warning: Unrecognized form: 0x22
2023-04-25T06:24:05.9574395Z readelf: Warning: Unrecognized form: 0x22
...
2023-04-25T06:24:05.9575038Z readelf: Warning: Bogus end-of-siblings marker detected at offset 5131 in .debug_info section
2023-04-25T06:24:05.9575305Z readelf: Warning: Unrecognized form: 0x22
2023-04-25T06:24:05.9575728Z readelf: Warning: Bogus end-of-siblings marker detected at offset 5147 in .debug_info section
2023-04-25T06:24:05.9576205Z readelf: Warning: Bogus end-of-siblings marker detected at offset 5156 in .debug_info section
2023-04-25T06:24:05.9577004Z readelf: Warning: Further warnings about bogus end-of-sibling markers suppressed
2023-04-25T06:24:05.9577299Z readelf: Warning: Unrecognized form: 0x23
2023-04-25T06:24:05.9577497Z readelf: Warning: Unrecognized form: 0x22
2023-04-25T06:24:05.9577714Z readelf: Warning: Unrecognized form: 0x22

With this change, the script uses llvm-readelf-15 in that container (matching the exact toolchain in use) and reports no warning.

Also removed the usage of eval in the script while I was at it.

@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Apr 25, 2023
@ghost
Copy link

ghost commented Apr 25, 2023

Tagging subscribers to this area: @tommcdon
See info in area-owners.md if you want to be subscribed.

Issue Details

null

Author: am11
Assignees: -
Labels:

area-Diagnostics-coreclr, community-contribution

Milestone: -

@ghost
Copy link

ghost commented Apr 25, 2023

Tagging subscribers to this area: @hoyosjs
See info in area-owners.md if you want to be subscribed.

Issue Details

null

Author: am11
Assignees: -
Labels:

area-Infrastructure-coreclr, community-contribution

Milestone: -

@am11 am11 force-pushed the feature/build/native-tools branch from b037af4 to 86e5350 Compare April 25, 2023 08:41
@am11 am11 marked this pull request as ready for review April 25, 2023 09:57
@am11 am11 requested review from clamp03 and janvorli April 25, 2023 09:57
@clamp03
Copy link
Member

clamp03 commented Apr 25, 2023

Thank you. You fixed errors in other archs like the one below

2023-04-25T06:26:04.3961679Z [ 95%] Built target coreclr
2023-04-25T06:26:04.4105174Z [ 95%] Generating coreclr module index file -> /__w/1/s/artifacts/obj/coreclr/linux.arm64.Checked/debug/runtimeinfo/runtimemoduleindex.h
2023-04-25T06:26:04.4194263Z /__w/1/s/eng/native/genmoduleindex.sh: line 40: readelf: command not found
2023-04-25T06:26:04.4259540Z [ 95%] Generating mscordaccore module index file -> /__w/1/s/artifacts/obj/coreclr/linux.arm64.Checked/debug/runtimeinfo/dacmoduleindex.h
2023-04-25T06:26:04.4344655Z /__w/1/s/eng/native/genmoduleindex.sh: line 40: readelf: command not found
2023-04-25T06:26:04.4407639Z [ 96%] Generating mscordbi module index file -> /__w/1/s/artifacts/obj/coreclr/linux.arm64.Checked/debug/runtimeinfo/dbimoduleindex.h
2023-04-25T06:26:04.4500891Z /__w/1/s/eng/native/genmoduleindex.sh: line 40: readelf: command not found
2023-04-25T06:24:12.1859277Z [ 94%] Built target coreclr
2023-04-25T06:24:12.1945446Z [ 94%] Generating coreclr module index file -> /__w/1/s/artifacts/obj/coreclr/linux.arm.Checked/debug/runtimeinfo/runtimemoduleindex.h
2023-04-25T06:24:12.2052980Z /__w/1/s/eng/native/genmoduleindex.sh: line 40: readelf: command not found
2023-04-25T06:24:12.2127116Z [ 94%] Generating mscordaccore module index file -> /__w/1/s/artifacts/obj/coreclr/linux.arm.Checked/debug/runtimeinfo/dacmoduleindex.h
2023-04-25T06:24:12.2236387Z /__w/1/s/eng/native/genmoduleindex.sh: line 40: readelf: command not found
2023-04-25T06:24:12.2305188Z [ 94%] Generating mscordbi module index file -> /__w/1/s/artifacts/obj/coreclr/linux.arm.Checked/debug/runtimeinfo/dbimoduleindex.h
2023-04-25T06:24:12.2408735Z /__w/1/s/eng/native/genmoduleindex.sh: line 40: readelf: command not found

Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@am11 am11 closed this Apr 25, 2023
@am11 am11 reopened this Apr 25, 2023
@am11
Copy link
Member Author

am11 commented Apr 26, 2023

Mono failures are unrelated / known failures according to build analysis.
This cleans up 1105 warnings in riscv64 leg.

@hoyosjs
Copy link
Member

hoyosjs commented Apr 26, 2023

All issues are known

@hoyosjs hoyosjs merged commit e8b41db into dotnet:main Apr 26, 2023
@ghost ghost locked as resolved and limited conversation to collaborators May 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Infrastructure-coreclr community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants