+2013-01-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf32-i386.c (elf_i386_check_relocs): Count size relocation as
+ PC-relative relocation.
+ * elf64-x86-64.c (elf_x86_64_check_relocs): Count size relocation
+ as PC-relative relocation.
+
2013-01-16 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_check_relocs): Update R_386_SIZE32
struct elf_link_hash_entry *h;
Elf_Internal_Sym *isym;
const char *name;
+ bfd_boolean size_reloc;
r_symndx = ELF32_R_SYM (rel->r_info);
r_type = ELF32_R_TYPE (rel->r_info);
break;
case R_386_SIZE32:
+ size_reloc = TRUE;
goto do_size;
case R_386_TLS_IE_32:
h->pointer_equality_needed = 1;
}
+ size_reloc = FALSE;
do_size:
/* If we are creating a shared library, and this is a reloc
against a global symbol, or a non PC relative reloc
}
p->count += 1;
- if (r_type == R_386_PC32)
+ /* Count size relocation as PC-relative relocation. */
+ if (r_type == R_386_PC32 || size_reloc)
p->pc_count += 1;
}
break;
struct elf_link_hash_entry *h;
Elf_Internal_Sym *isym;
const char *name;
+ bfd_boolean size_reloc;
r_symndx = htab->r_sym (rel->r_info);
r_type = ELF32_R_TYPE (rel->r_info);
case R_X86_64_SIZE32:
case R_X86_64_SIZE64:
+ size_reloc = TRUE;
goto do_size;
case R_X86_64_32:
h->pointer_equality_needed = 1;
}
+ size_reloc = FALSE;
do_size:
/* If we are creating a shared library, and this is a reloc
against a global symbol, or a non PC relative reloc
}
p->count += 1;
- if (IS_X86_64_PCREL_TYPE (r_type))
+ /* Count size relocation as PC-relative relocation. */
+ if (IS_X86_64_PCREL_TYPE (r_type) || size_reloc)
p->pc_count += 1;
}
break;
+2013-01-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ld-size/size32-3-i386.d: New file.
+ * ld-size/size32-3-x32.d: Likewise.
+ * ld-size/size32-3-x86-64.d: Likewise.
+ * ld-size/size32-3.s: Likewise.
+
2013-01-16 H.J. Lu <hongjiu.lu@intel.com>
* ld-size/size.exp: New file.