This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.17-129-g22676ea


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  22676eafedd0df276d85ea7c7ef63907d689d6ad (commit)
      from  59981e9b0df84aa91c52d21c54a7ed158a356aaa (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=22676eafedd0df276d85ea7c7ef63907d689d6ad

commit 22676eafedd0df276d85ea7c7ef63907d689d6ad
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 16 20:31:03 2013 -0800

    Implement x86 SIZE32/SIZE64 relocations

diff --git a/ChangeLog b/ChangeLog
index 56fa319..dfebce1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2013-01-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf/elf.h (R_386_SIZE32): New relocation.
+	* sysdeps/i386/dl-machine.h (elf_machine_rel): Handle
+	R_386_SIZE32.
+	(elf_machine_rela): Likewise.
+	* sysdeps/x86_64/dl-machine.h (elf_machine_rela): Handle
+	R_X86_64_SIZE64 and R_X86_64_SIZE32.
+
 2013-01-17  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/powerpc/bits/mathdef.h [_SOFT_FLOAT || __NO_FPRS__]
diff --git a/elf/elf.h b/elf/elf.h
index 9a31373..9bc5004 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -1229,7 +1229,7 @@ typedef struct
 #define R_386_TLS_DTPMOD32 35		/* ID of module containing symbol */
 #define R_386_TLS_DTPOFF32 36		/* Offset in TLS block */
 #define R_386_TLS_TPOFF32  37		/* Negated offset in static TLS block */
-/* 38? */
+#define R_386_SIZE32	   38 		/* 32-bit symbol size */
 #define R_386_TLS_GOTDESC  39		/* GOT offset for TLS descriptor.  */
 #define R_386_TLS_DESC_CALL 40		/* Marker of call through TLS
 					   descriptor for
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index 9e36687..a1e40d8 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -348,6 +348,12 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
 
       switch (r_type)
 	{
+# ifndef RTLD_BOOTSTRAP
+	case R_386_SIZE32:
+	  /* Set to symbol size plus addend.  */
+	  *reloc_addr += sym->st_size;
+	  break;
+# endif
 	case R_386_GLOB_DAT:
 	case R_386_JMP_SLOT:
 	  *reloc_addr = value;
@@ -507,6 +513,9 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
 
       switch (ELF32_R_TYPE (reloc->r_info))
 	{
+	case R_386_SIZE32:
+	  /* Set to symbol size plus addend.  */
+	  value = sym->st_size;
 	case R_386_GLOB_DAT:
 	case R_386_JMP_SLOT:
 	case R_386_32:
diff --git a/sysdeps/x86_64/dl-machine.h b/sysdeps/x86_64/dl-machine.h
index 660f1aa..4768c69 100644
--- a/sysdeps/x86_64/dl-machine.h
+++ b/sysdeps/x86_64/dl-machine.h
@@ -286,6 +286,21 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
 
       switch (r_type)
 	{
+# ifndef RTLD_BOOTSTRAP
+#  ifdef __ILP32__
+	case R_X86_64_SIZE64:
+	  /* Set to symbol size plus addend.  */
+	  *(Elf64_Addr *) (uintptr_t) reloc_addr
+	    = (Elf64_Addr) sym->st_size + reloc->r_addend;
+	  break;
+
+	case R_X86_64_SIZE32:
+#  else
+	case R_X86_64_SIZE64:
+#  endif
+	  /* Set to symbol size plus addend.  */
+	  value = sym->st_size;
+# endif
 	case R_X86_64_GLOB_DAT:
 	case R_X86_64_JUMP_SLOT:
 	  *reloc_addr = value + reloc->r_addend;
@@ -394,6 +409,11 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
 	     relocation updates the whole 64-bit entry.  */
 	  *(Elf64_Addr *) reloc_addr = (Elf64_Addr) value + reloc->r_addend;
 	  break;
+#  ifndef __ILP32__
+	case R_X86_64_SIZE32:
+	  /* Set to symbol size plus addend.  */
+	  value = sym->st_size;
+#  endif
 	case R_X86_64_32:
 	  value += reloc->r_addend;
 	  *(unsigned int *) reloc_addr = value;

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                   |    9 +++++++++
 elf/elf.h                   |    2 +-
 sysdeps/i386/dl-machine.h   |    9 +++++++++
 sysdeps/x86_64/dl-machine.h |   20 ++++++++++++++++++++
 4 files changed, 39 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]