aclements / libelfin

C++11 ELF/DWARF parser
MIT License
317 stars 99 forks source link

Add support for dynamic linking with libelf++ and libdwarf++ #16

Closed llvilanova closed 7 years ago

llvilanova commented 8 years ago

Allows external projects to be compiled independently of changes to our libraries, as long as they maintain ABI compatibility.

The ABI version is specified in the ABI variable of each library's Makefile.

llvilanova commented 8 years ago

I've been thinking about the ABI/SONAME thing in this patch. Are you planning on using the typical "major.minor.revision" version scheme? I mean:

If so, then I can change the patch to use "major.minor" as part of the SONAME, which can be automatically extracted from the git tags (relieving you from changing the ABI variable on the makefiles). The only downside is that you won't be able to set a separate SONAME for libelf++ and libdwarf++.

llvilanova commented 8 years ago

After talking to other people working with this type of things, I've updated the pull to clarify how to manage the sonames.

aclements commented 7 years ago

Are you planning on using the typical "major.minor.revision" version scheme?

Sure, I think semver makes sense and see no reason to deviate from it here.

If so, then I can change the patch to use "major.minor" as part of the SONAME, which can be automatically extracted from the git tags (relieving you from changing the ABI variable on the makefiles).

That could be nice, but what would be the convention when building from an un-tagged commit, which may have had ABI changes since the most recent tagged commit?

The only downside is that you won't be able to set a separate SONAME for libelf++ and libdwarf++.

That's slightly unfortunate, but I'm not too worried about it. If it does become a problem, it's always possible to switch back to a manual SONAME.

After talking to other people working with this type of things, I've updated the pull to clarify how to manage the sonames.

Looks good. It would make sense to just squash the two commits, since the first one no longer adds anything to the history.

llvilanova commented 7 years ago

If so, then I can change the patch to use "major.minor" as part of the SONAME, which can be automatically extracted from the git tags (relieving you from changing the ABI variable on the makefiles).

That could be nice, but what would be the convention when building from an un-tagged commit, which may have had ABI changes since the most recent tagged commit?

For that, we're (in the debian package) adding a "-d" suffix to the SONAME variable, making the package's snapshot unique.

llvilanova commented 7 years ago

BTW, I rewrote the pull request to merge the commits and identify the bug it fixes.