[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 6/9] error-report: add a callback to overwrite error_vprintf
From: |
Markus Armbruster |
Subject: |
Re: [PATCH 6/9] error-report: add a callback to overwrite error_vprintf |
Date: |
Thu, 07 Jul 2022 14:16:53 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
marcandre.lureau@redhat.com writes:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> error_vprintf() is implemented in monitor.c, which overrides the
> default implementation from stubs/, while avoiding a direct dependency
> to the monitor from error-report.c.
>
> However, the stub solution isn't working when moving error-report.c and
> stubs/error-printf.c in a common library. Linking with such library
> creates conflicts for the error_vprintf() implementations
I'm feeling dense today: how?
Why would the linker pull in error-printf.o when the symbols it defines
are already provided by .o the linker processed before the library
containing error-printf.o?
> (and weak
> symbols aren't great either).
Weak symbols are great, except Windows isn't.
> Instead, use the "traditional" approach to
> provide overidable callbacks.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
- Re: [PATCH 6/9] error-report: add a callback to overwrite error_vprintf,
Markus Armbruster <=