MCPcopy Create free account
hub / github.com/F-Stack/f-stack / link_elf_reloc_local

Function link_elf_reloc_local

freebsd/kern/link_elf.c:1828–1857  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1826}
1827
1828static void
1829link_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
1859static long
1860link_elf_symtab_get(linker_file_t lf, const Elf_Sym **symtab)

Callers 2

link_elf_link_preloadFunction · 0.70
link_elf_load_fileFunction · 0.70

Calls 1

elf_reloc_localFunction · 0.50

Tested by

no test coverage detected