diff options
author | emaste <emaste@FreeBSD.org> | 2016-02-05 20:54:51 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2016-02-05 20:54:51 +0000 |
commit | 860ed9e53f6883401334547dea3fcede88e39d50 (patch) | |
tree | 2c407491789c80d8fb3eae03ad6ab210e60d9caf /contrib/elftoolchain/readelf | |
parent | 21434c7a701096dfe0b99fcfe37d637fae83cb2b (diff) | |
download | FreeBSD-src-860ed9e53f6883401334547dea3fcede88e39d50.zip FreeBSD-src-860ed9e53f6883401334547dea3fcede88e39d50.tar.gz |
readelf: avoid accidental fallthrough in RISC-V relocations
This would have printed an unknown RISC-V relocation type as a SPARC
relocation.
CID: 1331398
Obtained from: ELF Tool Chain r3283
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'contrib/elftoolchain/readelf')
-rw-r--r-- | contrib/elftoolchain/readelf/readelf.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/elftoolchain/readelf/readelf.c b/contrib/elftoolchain/readelf/readelf.c index 6902024..7e9343e 100644 --- a/contrib/elftoolchain/readelf/readelf.c +++ b/contrib/elftoolchain/readelf/readelf.c @@ -1452,6 +1452,7 @@ r_type(unsigned int mach, unsigned int type) case 43: return "R_RISCV_ALIGN"; case 44: return "R_RISCV_RVC_BRANCH"; case 45: return "R_RISCV_RVC_JUMP"; + default: return ""; } case EM_SPARC: case EM_SPARCV9: |