Page MenuHomeFreeBSD

readelf: decode FreeBSD note types
ClosedPublic

Authored by emaste on Fri, Feb 1, 3:11 PM.

Details

Summary

Sample output:

% usr.bin/readelf/obj/readelf -n a.out.modified

Notes at offset 0x00000288 with length 0x00000048:
  Owner         Data size       Description
  FreeBSD       0x00000004      NT_FREEBSD_ABI_TAG
   ABI tag: 1300005
  FreeBSD       0x00000004      NT_FREEBSD_FEATURE_CTL
   Features: ASLR_DISABLE
  FreeBSD       0x00000004      NT_FREEBSD_NOINIT_TAG
   description data: 00 00 00 00

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

brooks accepted this revision.Fri, Feb 1, 6:15 PM

LGTM

contrib/elftoolchain/readelf/readelf.c
3494 ↗(On Diff #53510)

Is it local style to declare this sort of thing nearby? style(9) would be it above all the functions.

This revision is now accepted and ready to land.Fri, Feb 1, 6:15 PM
kib accepted this revision.Fri, Feb 1, 6:44 PM
emaste added inline comments.Fri, Feb 1, 8:24 PM
contrib/elftoolchain/readelf/readelf.c
3494 ↗(On Diff #53510)

They seem to be distributed in the existing file; probably they should actually be split out into a notes.c file but I would do that upstream to avoid conflicts

emaste updated this revision to Diff 53525.Fri, Feb 1, 9:57 PM

add alignment check

This revision now requires review to proceed.Fri, Feb 1, 9:57 PM
emaste updated this revision to Diff 53526.Fri, Feb 1, 10:00 PM

actually check alignment

kib added inline comments.Fri, Feb 1, 10:13 PM
contrib/elftoolchain/readelf/readelf.c
3504 ↗(On Diff #53526)

May be print something explaining why the note is not decoded.

This revision was not accepted when it landed; it landed in state Needs Review.Fri, Feb 1, 10:24 PM
Closed by commit rS343669: readelf: decode FreeBSD note types (authored by emaste, committed by ). · Explain Why
This revision was automatically updated to reflect the committed changes.