Page MenuHomeFreeBSD

elfctl: avoid touching file if no change
ClosedPublic

Authored by emaste on May 25 2021, 2:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 30, 12:02 AM
Unknown Object (File)
Thu, Mar 19, 3:50 AM
Unknown Object (File)
Tue, Mar 17, 10:40 PM
Unknown Object (File)
Tue, Mar 17, 10:14 AM
Unknown Object (File)
Tue, Mar 17, 3:38 AM
Unknown Object (File)
Sun, Mar 15, 10:50 AM
Unknown Object (File)
Feb 28 2026, 8:50 PM
Unknown Object (File)
Feb 26 2026, 5:21 PM

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste created this revision.
markj added inline comments.
usr.bin/elfctl/elfctl.c
314

I am surprised that we do not use libelf to write the update.

This revision is now accepted and ready to land.May 25 2021, 3:11 PM
usr.bin/elfctl/elfctl.c
314

I am surprised that we do not use libelf to write the update.

Yeah, we could; libelf doesn't really provide much in the way of convenience functions for accessing or modifying individual notes, but we could operate on the note section in memory and use libelf to write it back out.

I briefly considered the possibility that there might want to be some sort of force flag, but I don't see a lot of value.

This revision was automatically updated to reflect the committed changes.

I briefly considered the possibility that there might want to be some sort of force flag, but I don't see a lot of value.

Yeah, I gave that some brief thought too, and couldn't see a real use.