Re: Reduce function call costs on ELF platforms

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Reduce function call costs on ELF platforms
Дата
Msg-id 20211123011801.owaqwcy5vcoc6slg@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Reduce function call costs on ELF platforms  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Hi,

On 2021-11-22 20:13:28 -0500, Bruce Momjian wrote:
> On Mon, Nov 22, 2021 at 03:57:45PM -0800, Andres Freund wrote:
> > It does however change symbol binding, basically making all symbols bound
> > eagerly. Which I guess theoretically could be considered an ABI change,
> > because it removes the ability to intercept symbols referenced in a previously
> > loaded shared library, with a subsequently loaded library (e.g. loaded with
> > RTLD_DEEPBIND) function before the symbol is used. But that seems like a
> > stretch. And I think most ELF platforms/linux distributions have/are moving
> > towards using -Wl,-z,now -Wl,-z,relro also makes symbols bound eagerly.
> 
> I found this really interesting, and I am surprised how things got so
> suboptimal.

It's always been this way on ELF afaict (*).

I don't think anybody would design ELF the same way today. I think it's pretty
clear that defaulting to making symbols interceptable was a bad idea. But it's
where we are...


> Has it always been this way?  Is it the use of C++ that is causing this by
> default?

Nope, this is with plain C.

Greetings,

Andres Freund

(*) I guess you can argue it got a tad worse with the increasing use of
position independent executables, but that's a relatively small difference in
the scope of the issue.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Reduce function call costs on ELF platforms
Следующее
От: Andy Fan
Дата:
Сообщение: Re: Sequence's value can be rollback after a crashed recovery.