| 1826 | } |
| 1827 | |
| 1828 | static void |
| 1829 | link_elf_reloc_local(linker_file_t lf) |
| 1830 | { |
| 1831 | const Elf_Rel *rellim; |
| 1832 | const Elf_Rel *rel; |
| 1833 | const Elf_Rela *relalim; |
| 1834 | const Elf_Rela *rela; |
| 1835 | elf_file_t ef = (elf_file_t)lf; |
| 1836 | |
| 1837 | /* Perform relocations without addend if there are any: */ |
| 1838 | if ((rel = ef->rel) != NULL) { |
| 1839 | rellim = (const Elf_Rel *)((const char *)ef->rel + ef->relsize); |
| 1840 | while (rel < rellim) { |
| 1841 | elf_reloc_local(lf, (Elf_Addr)ef->address, rel, |
| 1842 | ELF_RELOC_REL, elf_lookup); |
| 1843 | rel++; |
| 1844 | } |
| 1845 | } |
| 1846 | |
| 1847 | /* Perform relocations with addend if there are any: */ |
| 1848 | if ((rela = ef->rela) != NULL) { |
| 1849 | relalim = (const Elf_Rela *) |
| 1850 | ((const char *)ef->rela + ef->relasize); |
| 1851 | while (rela < relalim) { |
| 1852 | elf_reloc_local(lf, (Elf_Addr)ef->address, rela, |
| 1853 | ELF_RELOC_RELA, elf_lookup); |
| 1854 | rela++; |
| 1855 | } |
| 1856 | } |
| 1857 | } |
| 1858 | |
| 1859 | static long |
| 1860 | link_elf_symtab_get(linker_file_t lf, const Elf_Sym **symtab) |
no test coverage detected