Lines 16014-16019
elf32_arm_adjust_dynamic_symbol (struct bfd_link_info * info,
Link Here
|
16014 |
if (bfd_link_pic (info) || globals->root.is_relocatable_executable) |
16014 |
if (bfd_link_pic (info) || globals->root.is_relocatable_executable) |
16015 |
return TRUE; |
16015 |
return TRUE; |
16016 |
|
16016 |
|
|
|
16017 |
/* If -z nocopyreloc was given, we won't generate them either. */ |
16018 |
if (info->nocopyreloc) |
16019 |
{ |
16020 |
h->non_got_ref = 0; |
16021 |
return TRUE; |
16022 |
} |
16023 |
|
16024 |
/* If we don't find any dynamic relocs in read-only sections, then |
16025 |
we'll be keeping the dynamic relocs and avoiding the copy reloc. */ |
16026 |
if (!readonly_dynrelocs (h)) |
16027 |
{ |
16028 |
h->non_got_ref = 0; |
16029 |
return TRUE; |
16030 |
} |
16031 |
|
16017 |
/* We must allocate the symbol in our .dynbss section, which will |
16032 |
/* We must allocate the symbol in our .dynbss section, which will |
16018 |
become part of the .bss section of the executable. There will be |
16033 |
become part of the .bss section of the executable. There will be |
16019 |
an entry for this symbol in the .dynsym section. The dynamic |
16034 |
an entry for this symbol in the .dynsym section. The dynamic |
Lines 16023-16031
elf32_arm_adjust_dynamic_symbol (struct bfd_link_info * info,
Link Here
|
16023 |
determine the address it must put in the global offset table, so |
16038 |
determine the address it must put in the global offset table, so |
16024 |
both the dynamic object and the regular object will refer to the |
16039 |
both the dynamic object and the regular object will refer to the |
16025 |
same memory location for the variable. */ |
16040 |
same memory location for the variable. */ |
16026 |
/* If allowed, we must generate a R_ARM_COPY reloc to tell the dynamic |
16041 |
/* We must generate a R_ARM_COPY reloc to tell the dynamic linker to |
16027 |
linker to copy the initial value out of the dynamic object and into |
16042 |
copy the initial value out of the dynamic object and into the |
16028 |
the runtime process image. We need to remember the offset into the |
16043 |
runtime process image. We need to remember the offset into the |
16029 |
.rel(a).bss section we are going to use. */ |
16044 |
.rel(a).bss section we are going to use. */ |
16030 |
if ((h->root.u.def.section->flags & SEC_READONLY) != 0) |
16045 |
if ((h->root.u.def.section->flags & SEC_READONLY) != 0) |
16031 |
{ |
16046 |
{ |
Lines 16037-16045
elf32_arm_adjust_dynamic_symbol (struct bfd_link_info * info,
Link Here
|
16037 |
s = globals->root.sdynbss; |
16052 |
s = globals->root.sdynbss; |
16038 |
srel = globals->root.srelbss; |
16053 |
srel = globals->root.srelbss; |
16039 |
} |
16054 |
} |
16040 |
if (info->nocopyreloc == 0 |
16055 |
if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0) |
16041 |
&& (h->root.u.def.section->flags & SEC_ALLOC) != 0 |
|
|
16042 |
&& h->size != 0) |
16043 |
{ |
16056 |
{ |
16044 |
elf32_arm_allocate_dynrelocs (info, srel, 1); |
16057 |
elf32_arm_allocate_dynrelocs (info, srel, 1); |
16045 |
h->needs_copy = 1; |
16058 |
h->needs_copy = 1; |
16046 |
- |
|
|