2012-09-06 Cary Coutant <ccoutant@google.com>
authorCary Coutant <ccoutant@google.com>
Fri, 7 Sep 2012 20:14:10 +0000 (20:14 +0000)
committerCary Coutant <ccoutant@google.com>
Fri, 7 Sep 2012 20:14:10 +0000 (20:14 +0000)
gold/
* dwarf_reader.cc (Dwarf_die::read_attributes): Add
DW_FORM_GNU_addr_index and DW_FORM_GNU_str_index.
(Dwarf_die::skip_attributes): Likewise.
* object.cc (Read_symbols_data::~Read_symbols_data): Update comment.
* testsuite/gdb_index_test.cc (inline_func_1): New function.
(main): Call it.
* testsuite/gdb_index_test_comm.sh: Check index for inline function.

gold/ChangeLog
gold/dwarf_reader.cc
gold/object.cc
gold/testsuite/gdb_index_test.cc
gold/testsuite/gdb_index_test_comm.sh

index 320f8326ccaace8c4abc212cdb7772bb79355ac2..ce00f17eca4e8cd66301bf9338b3aa016624226c 100644 (file)
@@ -1,3 +1,13 @@
+2012-09-06  Cary Coutant  <ccoutant@google.com>
+
+       * dwarf_reader.cc (Dwarf_die::read_attributes): Add
+       DW_FORM_GNU_addr_index and DW_FORM_GNU_str_index.
+       (Dwarf_die::skip_attributes): Likewise.
+       * object.cc (Read_symbols_data::~Read_symbols_data): Update comment.
+       * testsuite/gdb_index_test.cc (inline_func_1): New function.
+       (main): Call it.
+       * testsuite/gdb_index_test_comm.sh: Check index for inline function.
+
 2012-09-05  H.J. Lu  <hongjiu.lu@intel.com>
 
        * testsuite/script_test_3.t: Add .got.plt output section
index ac87f4b843d8d7ab6ce5ef260e71ce8f22f9d2b6..00347032a0c6aa76244d65743566d2b09fd79b22 100644 (file)
@@ -745,6 +745,8 @@ Dwarf_die::read_attributes()
            pattr += len;
            break;
          case elfcpp::DW_FORM_udata:
+         case elfcpp::DW_FORM_GNU_addr_index:
+         case elfcpp::DW_FORM_GNU_str_index:
            attr_value.val.uintval = read_unsigned_LEB_128(pattr, &len);
            pattr += len;
            break;
@@ -895,6 +897,8 @@ Dwarf_die::skip_attributes()
            break;
          case elfcpp::DW_FORM_ref_udata:
          case elfcpp::DW_FORM_udata:
+         case elfcpp::DW_FORM_GNU_addr_index:
+         case elfcpp::DW_FORM_GNU_str_index:
            read_unsigned_LEB_128(pattr, &len);
            pattr += len;
            break;
index 6c0c1877260ad587e17cdb84dc4a123ef24a3fd8..6ee10f522d74899cc80040baf6a7ce459c166831 100644 (file)
@@ -48,7 +48,8 @@ namespace gold
 
 // Struct Read_symbols_data.
 
-// Destroy any remaining File_view objects.
+// Destroy any remaining File_view objects and buffers of decompressed
+// sections.
 
 Read_symbols_data::~Read_symbols_data()
 {
index 342d47c50494c1d4513580a8ae5b83efd02d5877..d5ac2f19de0df82dcf8005a1ecc6102e4e7c2fcb 100644 (file)
@@ -123,6 +123,16 @@ struct anonymous_union_container {
 
 anonymous_union_container anonymous_union_var;
 
+#ifdef __GNUC__
+#define ALWAYS_INLINE __attribute__((always_inline))
+#else
+#define ALWAYS_INLINE
+#endif
+
+static inline ALWAYS_INLINE int
+inline_func_1(int i)
+{ return i * 17; }
+
 int
 main()
 {
@@ -134,5 +144,6 @@ main()
   check(&two::c2v1);
   check(&two::c2v2);
   check(&two::c2v3);
+  anonymous_union_var.u.b = inline_func_1(3) - 51;
   return anonymous_union_var.u.b;
 }
index 71003293b2d2402d09dab2399b3dbfb9ecf5c73b..4ab07b3c3a253cfc792fdefbf6428e26ce11e598 100755 (executable)
@@ -80,5 +80,6 @@ check $STDOUT "^\[ *[0-9]*\] two::c2<int>:"
 check $STDOUT "^\[ *[0-9]*\] two::c2v1:"
 check $STDOUT "^\[ *[0-9]*\] two::c2v2:"
 check $STDOUT "^\[ *[0-9]*\] anonymous_union_var:"
+check $STDOUT "^\[ *[0-9]*\] inline_func_1:"
 
 exit 0
This page took 0.041337 seconds and 4 git commands to generate.