Fix program symbols exported in dynsym section
commit9336fa7ae50ef60cb0049136a7831e7e8d94a20a
authorThomas Preud'homme <robotux@celest.fr>
Sat, 18 Apr 2015 07:28:02 +0000 (18 15:28 +0800)
committerThomas Preud'homme <robotux@celest.fr>
Sat, 18 Apr 2015 07:34:04 +0000 (18 15:34 +0800)
tree649e8c3af3a4a3c1d582eec258768294b3e3d731
parentb472d53672bb8840511cc6d59316c5ea435a396e
Fix program symbols exported in dynsym section

Prior to this commit TinyCC was exporting symbols defined in programs
only when they resolve an undefined symbol of a library. However, the
expected behavior (see --export-dynamic in GNU ld manpage) is that all
symbols used by libraries and defined by a program should be exported in
dynsym section. This is because symbol resolution search first in
program and then in libraries, thus allowing program symbol to interpose
symbol defined in a library.
tccelf.c