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

rv_histogram: Make it more verbose #276

Merged
merged 1 commit into from
Nov 23, 2023
Merged

Conversation

ChinYikMing
Copy link
Collaborator

@ChinYikMing ChinYikMing commented Nov 23, 2023

Section headers must be present for static analysis since the tool uses the SHT_PROGBITS type and SHF_EXECINSTR flag, which are defined in section headers, to determine the executable machine instructions of the target program

Closed #272

tools/rv_histogram.c Fixed Show fixed Hide fixed
tools/rv_histogram.c Fixed Show fixed Hide fixed
tools/rv_histogram.c Fixed Show fixed Hide fixed
tools/rv_histogram.c Outdated Show resolved Hide resolved
Copy link
Contributor

@jserv jserv left a comment

Choose a reason for hiding this comment

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

Explain why ELF section headers are necessary for static analysis in the git commit message.

tools/rv_histogram.c Outdated Show resolved Hide resolved
tools/rv_histogram.c Outdated Show resolved Hide resolved
if (!hdr->e_shnum) {
(void) fprintf(stderr, "no section headers are found in %s\n",
elf_prog);
return 1;

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 15.5 rule Note

MISRA 15.5 rule
fprintf(stderr, "elf_open failed\n");
return 1;
(void) fprintf(stderr, "Failed to open %s\n", elf_prog);
return 1;

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 15.5 rule Note

MISRA 15.5 rule
tools/rv_histogram.c Fixed Show fixed Hide fixed
Section headers must be present for static analysis since the tool uses
the SHT_PROGBITS type and SHF_EXECINSTR flag, which are defined in
section headers, to determine the executable machine instructions
of the target program

Closed sysprog21#272
@jserv jserv merged commit 612c89d into sysprog21:master Nov 23, 2023
21 checks passed
@jserv
Copy link
Contributor

jserv commented Nov 23, 2023

Thank @ChinYikMing for contributing!

@ChinYikMing ChinYikMing deleted the pr2 branch November 24, 2023 13:09
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.

histogram: Fail to execute with cc.elf
2 participants