criu/include/common
Dmitry Safonov c9fdd355f6 pie: Mark __export_*() functions as externally_visible
GCC's lto source:
> To avoid this problem the compiler must assume that it sees the
> whole program when doing link-time optimization.  Strictly
> speaking, the whole program is rarely visible even at link-time.
> Standard system libraries are usually linked dynamically or not
> provided with the link-time information.  In GCC, the whole
> program option (@option{-fwhole-program}) asserts that every
> function and variable defined in the current compilation
> unit is static, except for function @code{main} (note: at
> link time, the current unit is the union of all objects compiled
> with LTO).  Since some functions and variables need to
> be referenced externally, for example by another DSO or from an
> assembler file, GCC also provides the function and variable
> attribute @code{externally_visible} which can be used to disable
> the effect of @option{-fwhole-program} on a specific symbol.

As far as I read gcc's source, ipa_comdats() will avoid placing symbols
that are either already in a user-defined section or have
externally_visible attribute into new optimized gcc sections.

Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
2023-10-22 13:29:25 -07:00
..
arch Return page size as unsigned long 2023-10-22 13:29:25 -07:00
asm-generic asm: fix for_each_bit macro 2023-04-15 21:17:21 -07:00
bitops.h Run 'make indent' on header files 2021-09-03 10:31:00 -07:00
bitsperlong.h common: bitsperlong -- Specify complete path 2016-11-03 00:13:04 +03:00
bug.h Run 'make indent' on header files 2021-09-03 10:31:00 -07:00
compiler.h pie: Mark __export_*() functions as externally_visible 2023-10-22 13:29:25 -07:00
err.h Run 'make indent' on header files 2021-09-03 10:31:00 -07:00
list.h Run 'make indent' on header files 2021-09-03 10:31:00 -07:00
lock.h Fix some codespell warnings 2022-04-28 17:53:52 -07:00
page.h common: Use complete path in inclusion 2016-11-03 00:13:04 +03:00
scm-code.c Fix some codespell warnings 2022-04-28 17:53:52 -07:00
scm.h ci: fix new codespell errors 2023-10-22 13:29:25 -07:00
xmalloc.h Run 'make indent' on header files 2021-09-03 10:31:00 -07:00