public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/6] elf.h: Update from glibc. Add section compression constants and structures.
@ 2015-10-21 22:19 Mark Wielaard
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Wielaard @ 2015-10-21 22:19 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 2333 bytes --]

Signed-off-by: Mark Wielaard <mjw@redhat.com>
---
 libelf/ChangeLog |  5 +++++
 libelf/elf.h     | 25 +++++++++++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index d8651d7..12dbe0a 100644
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-14  Mark Wielaard  <mjw@redhat.com>
+
+	* elf.h: Update from glibc. Add section compression constants and
+	structures.
+
 2015-10-09  Josh Stone  <jistone@redhat.com>
 
 	* libelf.h: Replace loff_t with int64_t throughout.
diff --git a/libelf/elf.h b/libelf/elf.h
index 39bafc2..12feb91 100644
--- a/libelf/elf.h
+++ b/libelf/elf.h
@@ -367,6 +367,7 @@ typedef struct
 					   required */
 #define SHF_GROUP	     (1 << 9)	/* Section is member of a group.  */
 #define SHF_TLS		     (1 << 10)	/* Section hold thread-local data.  */
+#define SHF_COMPRESSED	     (1 << 11)	/* Section with compressed data. */
 #define SHF_MASKOS	     0x0ff00000	/* OS-specific.  */
 #define SHF_MASKPROC	     0xf0000000	/* Processor-specific */
 #define SHF_ORDERED	     (1 << 30)	/* Special ordering requirement
@@ -374,6 +375,30 @@ typedef struct
 #define SHF_EXCLUDE	     (1U << 31)	/* Section is excluded unless
 					   referenced or allocated (Solaris).*/
 
+/* Section compression header.  Used when SHF_COMPRESSED is set.  */
+
+typedef struct
+{
+  Elf32_Word	ch_type;	/* Compression format.  */
+  Elf32_Word	ch_size;	/* Uncompressed data size.  */
+  Elf32_Word	ch_addralign;	/* Uncompressed data alignment.  */
+} Elf32_Chdr;
+
+typedef struct
+{
+  Elf64_Word	ch_type;	/* Compression format.  */
+  Elf64_Word	ch_reserved;
+  Elf64_Xword	ch_size;	/* Uncompressed data size.  */
+  Elf64_Xword	ch_addralign;	/* Uncompressed data alignment.  */
+} Elf64_Chdr;
+
+/* Legal values for ch_type (compression algorithm).  */
+#define ELFCOMPRESS_ZLIB	1	   /* ZLIB/DEFLATE algorithm.  */
+#define ELFCOMPRESS_LOOS	0x60000000 /* Start of OS-specific.  */
+#define ELFCOMPRESS_HIOS	0x6fffffff /* End of OS-specific.  */
+#define ELFCOMPRESS_LOPROC	0x70000000 /* Start of processor-specific.  */
+#define ELFCOMPRESS_HIPROC	0x7fffffff /* End of processor-specific.  */
+
 /* Section group handling.  */
 #define GRP_COMDAT	0x1		/* Mark group as COMDAT.  */
 
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/6] elf.h: Update from glibc. Add section compression constants and structures.
@ 2015-10-22 21:27 Mark Wielaard
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Wielaard @ 2015-10-22 21:27 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

On Wed, Oct 21, 2015 at 03:37:26PM -0700, Roland McGrath wrote:
> An elf.h update can always go in without further notice or discussion.

Pushed that commit to master already. The rest, to take actualy advantage
of new constants and structures, has to wait for further discussion.

Cheers,

Mark

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/6] elf.h: Update from glibc. Add section compression constants and structures.
@ 2015-10-21 22:37 Roland McGrath
  0 siblings, 0 replies; 3+ messages in thread
From: Roland McGrath @ 2015-10-21 22:37 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 72 bytes --]

An elf.h update can always go in without further notice or discussion.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-22 21:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-21 22:19 [PATCH 1/6] elf.h: Update from glibc. Add section compression constants and structures Mark Wielaard
2015-10-21 22:37 Roland McGrath
2015-10-22 21:27 Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).