[RFC,V5,6/6] Handle CTF sections when LTO is enabled

Message ID 1568003301-11457-7-git-send-email-indu.bhagat@oracle.com
State New
Headers show
Series
  • Support for CTF in GCC
Related show

Commit Message

Indu Bhagat Sept. 9, 2019, 4:28 a.m.
libiberty/ChangeLog:

	* simple-object.c (handle_lto_debug_sections): Copy CTF section.

---
 libiberty/ChangeLog       | 5 +++++
 libiberty/simple-object.c | 3 +++
 2 files changed, 8 insertions(+)

-- 
1.8.3.1

Patch

diff --git a/libiberty/simple-object.c b/libiberty/simple-object.c
index b00c265..96bdcf8 100644
--- a/libiberty/simple-object.c
+++ b/libiberty/simple-object.c
@@ -298,6 +298,9 @@  handle_lto_debug_sections (const char *name, int rename)
      COMDAT sections in objects produced by GCC.  */
   else if (strcmp (name, ".comment") == 0)
     return strcpy (newname, name);
+  /* Copy over .ctf section under the same name if present.  */
+  else if (strcmp (name, ".ctf") == 0)
+    return strcpy (newname, name);
   free (newname);
   return NULL;
 }