glibc/csu
H.J. Lu 84a7eb1f87 Use __executable_start as the lowest address for profiling [BZ #28153]
Glibc assumes that ENTRY_POINT is the lowest address for which we need
to keep profiling records and BFD linker uses a linker script to place
the input sections.

Starting from GCC 4.6, the main function is placed in .text.startup
section and starting from binutils 2.22, BFD linker with

commit add44f8d5c5c05e08b11e033127a744d61c26aee
Author: Alan Modra <amodra@gmail.com>
Date:   Thu Nov 25 03:03:02 2010 +0000

            * scripttempl/elf.sc: Group .text.exit, text.startup and .text.hot
            sections.

places .text.startup section before .text section, which leave the main
function out of profiling records.

Starting from binutils 2.15, linker provides __executable_start to mark
the lowest address of the executable.  Use __executable_start as the
lowest address to keep the main function in profiling records. This fixes
[BZ #28153].

Tested on Linux/x86-64, Linux/x32 and Linux/i686 as well as with
build-many-glibcs.py.
2021-08-24 06:44:18 -07:00
..
abi-note.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
check_fds.c Use 64 bit time_t stat internally 2021-06-22 12:09:52 -03:00
dso_handle.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
errno-loc.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
errno.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
gmon-start.c Use __executable_start as the lowest address for profiling [BZ #28153] 2021-08-24 06:44:18 -07:00
init-first.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
init.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libc-start.c Force building with -fno-common 2021-07-09 20:09:14 +02:00
libc-tls.c elf: Introduce __tls_pre_init_tp 2021-05-10 10:31:41 +02:00
Makefile Build libc-start with stack protector for SHARED 2021-03-15 20:25:00 +05:30
start.c
static-reloc.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sysdep.c
version.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Versions Reduce the statically linked startup code [BZ #23323] 2021-02-25 12:13:02 +01:00