Bug 143699 - [patch] brandelf(1): extend brandelf's OS knowledge
Summary: [patch] brandelf(1): extend brandelf's OS knowledge
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 9.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-09 14:00 UTC by Alexander Best
Modified: 2018-05-21 00:02 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (2.38 KB, patch)
2010-02-09 14:00 UTC, Alexander Best
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Best 2010-02-09 14:00:08 UTC
this patch adds extra functionality to brandelf so it's able to brand all elf types defined by POSIX.1-2008.

the patchset has been discussed in this thread:

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-January/030470.html

some people liked the idea of brandelf being extended this way, while others disliked the idea due to the fact that freebsd itself isn't able to run any elf binaries apart from FreeBSD(9) Linux(3) Solaris(6) SVR4(0).

personally i didn't see the connection between brand'elfing binaries and running them. brandelf's purpose also includes simply branding binaries without running them. think of a bunch of NetBSD/OpenBSD/... files which should be backup'ed under FreeBSD, but are brandelf'ed improperly. in this case the patch would come in handy.

cheers.
alex

Fix: Patch attached with submission follows:
Comment 1 Pedro F. Giffuni 2010-02-09 16:26:46 UTC
As I noted in private to Alexander, the elftoolchain
project has a better implementation that:
- Uses libelf
- Takes advantage of the FreeBSD headers

https://sourceforge.net/apps/trac/elftoolchain/browser/trunk/brandelf
Comment 2 Alexander Best 2010-02-09 17:42:44 UTC
thanks for the reply.

indeed the libelf project has a much better implementation of brandelf than
the one in the freebsd base dir.

hopefully at some point the libelf project's work will be included into the
base dir and replace most of the gnu (or even pre-gnu) elf binaries/libraries.

however until then i don't see why existing code - although inferior to the
libelf project's code - shouldn't be enhanced here and there.

also it's a lot easier to find a committer to add a few changes to an app
which obviously won't break stuff than to find somebody to replace an existing
binary with a whole new one.

so i completely agree with you. i'm looking forward to seeing libelf's work in
the base dir, but until then time (or better yet code) doesn't have to stand
still. ;)

cheers.
alex
Comment 3 Pedro F. Giffuni 2010-02-09 19:05:49 UTC
Actually,

The code is not too different. I am OK with seeing your patch go in too.
Comment 4 Alexander Best freebsd_committer 2010-08-09 19:08:48 UTC
State Changed
From-To: open->suspended

Brandelf along with other elf-related tools will eventually be replaced by 
importing the BSD-licensed elftoolchain project into the FreeBSD tree. 
Once the import occurs this PR should be re-evaluated.
Comment 5 Ed Maste freebsd_committer 2017-10-15 19:19:05 UTC
The patch can go in and be merged into ELF Tool Chain's copy from FreeBSD.
Comment 6 Eitan Adler freebsd_committer freebsd_triage 2018-05-20 23:59:52 UTC
For bugs matching the following conditions:
- Status == In Progress
- Assignee == "bugs@FreeBSD.org"
- Last Modified Year <= 2017

Do
- Set Status to "Open"