-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP 2: Experimental fix for libqb logging not working with ld.bfd 2.29
What's missing: * cross-testing programs vs. libqb prior/after this fix with ld.bfd 2.29 * program vs. library sanity attestation for good measure - code header-included in the program could/shall run-time one-off self-test the library code actually logs anything via custom callback log handler - library could/shall attest in qb_log_init that QB_ATTR_SECTION_START + STOP symbols belong to other address space than its own (dladdr?) Version 2: Simplify the compilation against libqb for its users that now no longer need to worry to use a new flag for compilation with the affected ld version, as semantically the same is already contained in libqb.so itself (it's now a linker script instead of a common symlink to the end versioned so file, which something known as an implicit linker script: https://sourceware.org/binutils/docs/ld/Implicit-Linker-Scripts.html). Deficiencies of version 2 (some carried over, apparently): - BUILT_SOURCES in lib/Makefile.am should be generalized over all dependent places: https://www.gnu.org/software/automake/manual/automake.html#Recording-Dependencies-manually - see What's missing above Deficiencies that are not solvable as long as we use the linker script to participate in restoring boundary section symbols being global again: - /usr/bin/ld: warning: ../lib/qblog_script.ld contains output sections; did you forget -T? References: http://oss.clusterlabs.org/pipermail/developers/2017-July/000503.html https://bugzilla.redhat.com/show_bug.cgi?id=1477354#c8 Signed-off-by: Jan Pokorný <[email protected]>
- Loading branch information
Showing
8 changed files
with
109 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,8 @@ configure | |
/.tarball-version | ||
/tag-* | ||
|
||
/lib/qblog_script.ld | ||
|
||
libtool | ||
.version | ||
libqb.spec | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include <qb/qblog.h> | ||
/* GNU ld script | ||
This atypical arrangement enforces global visibility of boundary symbols | ||
(QB_ATTR_SECTION_START, QB_ATTR_SECTION_STOP) for the custom section | ||
QB_ATTR_SECTION used for compile-time offloading of the logging call sites | ||
tracking. While libqb relies on these being global, default linker from | ||
binutils change the visibility as of version 2.29, making the logging | ||
unusable without artificial stimulus: https://bugzilla.redhat.com/1477354 */ | ||
SECTIONS { | ||
QB_ATTR_SECTION : { | ||
QB_ATTR_SECTION_START = .; | ||
*(QB_ATTR_SECTION); | ||
QB_ATTR_SECTION_STOP = .; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters