Lines 3212-3221
_bfd_sparc_elf_relocate_section (bfd *output_bfd,
Link Here
|
3212 |
off &= ~1; |
3212 |
off &= ~1; |
3213 |
else |
3213 |
else |
3214 |
{ |
3214 |
{ |
3215 |
SPARC_ELF_PUT_WORD (htab, output_bfd, relocation, |
|
|
3216 |
htab->elf.sgot->contents + off); |
3217 |
h->got.offset |= 1; |
3218 |
|
3219 |
if (h->dynindx == -1 |
3215 |
if (h->dynindx == -1 |
3220 |
&& !h->forced_local |
3216 |
&& !h->forced_local |
3221 |
&& h->root.type != bfd_link_hash_undefweak |
3217 |
&& h->root.type != bfd_link_hash_undefweak |
Lines 3225-3230
_bfd_sparc_elf_relocate_section (bfd *output_bfd,
Link Here
|
3225 |
generate R_SPARC_RELATIVE here. */ |
3221 |
generate R_SPARC_RELATIVE here. */ |
3226 |
relative_reloc = TRUE; |
3222 |
relative_reloc = TRUE; |
3227 |
} |
3223 |
} |
|
|
3224 |
else |
3225 |
SPARC_ELF_PUT_WORD (htab, output_bfd, relocation, |
3226 |
htab->elf.sgot->contents + off); |
3227 |
h->got.offset |= 1; |
3228 |
} |
3228 |
} |
3229 |
} |
3229 |
} |
3230 |
else |
3230 |
else |
Lines 3245-3256
_bfd_sparc_elf_relocate_section (bfd *output_bfd,
Link Here
|
3245 |
else |
3245 |
else |
3246 |
{ |
3246 |
{ |
3247 |
if (bfd_link_pic (info)) |
3247 |
if (bfd_link_pic (info)) |
3248 |
{ |
3248 |
relative_reloc = TRUE; |
3249 |
relative_reloc = TRUE; |
3249 |
else |
3250 |
} |
3250 |
SPARC_ELF_PUT_WORD (htab, output_bfd, relocation, |
3251 |
|
3251 |
htab->elf.sgot->contents + off); |
3252 |
SPARC_ELF_PUT_WORD (htab, output_bfd, relocation, |
|
|
3253 |
htab->elf.sgot->contents + off); |
3254 |
local_got_offsets[r_symndx] |= 1; |
3252 |
local_got_offsets[r_symndx] |= 1; |
3255 |
} |
3253 |
} |
3256 |
} |
3254 |
} |
Lines 3271-3278
_bfd_sparc_elf_relocate_section (bfd *output_bfd,
Link Here
|
3271 |
outrel.r_info = SPARC_ELF_R_INFO (htab, NULL, |
3269 |
outrel.r_info = SPARC_ELF_R_INFO (htab, NULL, |
3272 |
0, R_SPARC_RELATIVE); |
3270 |
0, R_SPARC_RELATIVE); |
3273 |
outrel.r_addend = relocation; |
3271 |
outrel.r_addend = relocation; |
3274 |
relocation = 0; |
|
|
3275 |
sparc_elf_append_rela (output_bfd, s, &outrel); |
3272 |
sparc_elf_append_rela (output_bfd, s, &outrel); |
|
|
3273 |
/* Versions of glibc ld.so at least up to 2.26 wrongly |
3274 |
add the section contents to the value calculated for |
3275 |
a RELATIVE reloc. Zero the contents to work around |
3276 |
this bug. */ |
3277 |
relocation = 0; |
3278 |
SPARC_ELF_PUT_WORD (htab, output_bfd, relocation, |
3279 |
htab->elf.sgot->contents + off); |
3276 |
} |
3280 |
} |
3277 |
|
3281 |
|
3278 |
relocation = htab->elf.sgot->output_offset + off - got_base; |
3282 |
relocation = htab->elf.sgot->output_offset + off - got_base; |
3279 |
- |
|
|