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)
Wed, Apr 17, 6:30 PM
Unknown Object (File)
Jan 27 2024, 4:21 AM
Unknown Object (File)
Dec 30 2023, 9:43 PM
Unknown Object (File)
Dec 30 2023, 9:38 PM
Unknown Object (File)
Dec 30 2023, 9:38 PM
Unknown Object (File)
Dec 27 2023, 3:10 PM
Unknown Object (File)
Dec 20 2023, 4:17 AM
Unknown Object (File)
Dec 16 2023, 3:50 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.