diff options
| author | Ulrich Drepper <[email protected]> | 2007-02-05 07:13:52 +0000 |
|---|---|---|
| committer | Ulrich Drepper <[email protected]> | 2007-02-05 07:13:52 +0000 |
| commit | ce0bdb6ee5f977af9e565f2871ba2b1b37d162a5 (patch) | |
| tree | 70363f02b05cd12b72182cc9865cbba30433794c /src/elflint.c | |
| parent | cd8a250aa139016def485e91d2da49c87de3baec (diff) | |
Implement ar program.
Relax elflint in GNU ld mode for latest idiosyncracies.
Diffstat (limited to 'src/elflint.c')
| -rw-r--r-- | src/elflint.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/elflint.c b/src/elflint.c index f887ac3c..79e52299 100644 --- a/src/elflint.c +++ b/src/elflint.c @@ -731,9 +731,22 @@ section [%2d] '%s': symbol %zu: function in COMMON section is nonsense\n"), { if ((sym->st_value - destshdr->sh_addr) > destshdr->sh_size) - ERROR (gettext ("\ + { + /* GNU ld has severe bugs. When it decides to remove + empty sections it leaves symbols referencing them + behind. These are symbols in .symtab. */ + if (!gnuld + || strcmp (section_name (ebl, idx), ".symtab") + || (strcmp (name, "__preinit_array_start") != 0 + && strcmp (name, "__preinit_array_end") != 0 + && strcmp (name, "__init_array_start") != 0 + && strcmp (name, "__init_array_end") != 0 + && strcmp (name, "__fini_array_start") != 0 + && strcmp (name, "__fini_array_end") != 0)) + ERROR (gettext ("\ section [%2d] '%s': symbol %zu: st_value out of bounds\n"), - idx, section_name (ebl, idx), cnt); + idx, section_name (ebl, idx), cnt); + } else if ((sym->st_value - destshdr->sh_addr + sym->st_size) > destshdr->sh_size) ERROR (gettext ("\ |
