Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elftoolchain rework, update and change how we import things #196

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

haesbaert
Copy link
Contributor

@haesbaert haesbaert commented Jun 4, 2024

This is an in progress port of the elftoolchain work from quark.

  • Removes dependency from bmake(1) by adding a GNUMakefile
  • Cuts source code from 22M to 2M
  • Cuts sources from 2381 files to 81
  • Adds the necessary stubs to work with a new libbpf without any changes to libbpf
  • All local changes are under #ifdef ELASTIC

Since this is nasty and ungrateful work, I tried to split the commits to make this readable.
First one basically rm -rf contrib/elftoolchain, then import things verbatim, then import the interesting things. So if you're looking at this commit, ignore the first ones.

Once this is done, next step is cleaning up and updating libbpf, which should now work with this elftoolchain without any changes.

This is a partial import of elftoolchain/libelf with only the files we are
really going to use.

This commit has no modification to any of the files, except for a new file
`commit` added so that we can track our starting point, it tracks the commit of
upstream elftoolchain.

A non-complete list of what has NOT been imported:
	- addr2line/
	- ar/
	- as/
	- brandelf/
	- cxxfilt/
	- documentation/
	- elfcopy/
	- elfdump/
	- findtextrel/
	- GNUmakefile
	- INSTALL
	- isa/
	- ld/
	- libdwarf/
	- libelftc/
	- libpe/
	- Makefile
	- mk/
	- nm/
	- readelf/
	- README.rst
	- RELEASE-NOTES
	- size/
	- strings/
	- test/
	- tools/
	- libelf/{Makefile, *.3, *.cat3}
	- common/Makefile
	- common/sys/Makefile

The next commit has all the changes and additions we did to make this work
nicely with quark and a recent libbpf.
Separated in its own commit so we can actually read the diff.
It works but I'm not happy.
It's missing the whole bmake pruning, and figuring out if we should bother
tracking dependencies, since cmake does its own thing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant