New contributor looking for a starting point in elf/ (dynamic linker)

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Mon Aug 3 18:15:43 GMT 2026



On 30/07/26 20:55, 김형원 via Libc-help wrote:
> Hi, I'm Hyungwon Kim.
> 
> I'm interested in contributing to glibc.
> 
> I've practiced writing syscalls and solved some ROP challenges from
> pwn.college, so I know some things about the ELF file format and related
> topics (ET_EXEC vs ET_DYN, etc).
> 
> I cloned the glibc source and read a bit of code around elf/.
> 
> I also read Patrick Horgan's post on how __libc_csu_init prepares for
> main(), and got interested in how (csu/elf-init.c) was removed in glibc
> 2.34 because it
> contained a convenient ROP gadget which was exploitable with ret2csu.
> 
> That made me curious how dynamic linkers handle program startup as well.
> 
> I'd like to keep learning in that direction, but don't have a good sense of
> which parts of elf/ (or the dynamic linker in general) are active and
> approachable for a new contributor.
> 
> Does anyone have a recommendation on where to look,
> or something I could realistically work to patch on?
Hi Hyungwon Kim,

The elf/ contains the system generic shared between Hurd and Linux, each
OS also have system-specific code at sysdeps (sysdeps/mach/ for Hurd and
sysdeps/unix/sysv/linux for Linux). We also have the code at csu/, which
is used for static-linking and process initialization.

To understand to code better I would start at the elf/rtld.c, which is the
main path for the dynamic loader (ld.so).  It should give you a good
understanding on how the dynamic-linking and process startup works.

To a beginner I would recommend check on writing tests for elf/
instead of jump into a bug and/or new feature. For instance, we have limited
test for sotruss-lib.c + sotruss.sh, and chroot_canon.c, and for old format
cache.c (just to name some on top on my mind).

If you feel confident on work on patch, we have a somewhat long bug
backlog [1].  Some recent issues are being worked, so you might check 
the patchwork [2] to either see if there is already a proposed fix.

[1] https://sourceware.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=SUSPENDED&bug_status=WAITING&bug_status=REOPENED&component=dynamic-link&list_id=104448&product=glibc&query_format=advanced
[2] https://patchwork.sourceware.org/project/glibc/list/


More information about the Libc-help mailing list