[binutils, ARM, 8/16] BFL infrastructure with new global reloc R_ARM_THM_BF18
[deliverable/binutils-gdb.git] / bfd / elf-eh-frame.c
index 12f06ef9baa150cf460b451dad9cacd37116b19c..6919ac3031bedf8b9748f643ddcdbfc7d0ffe8a2 100644 (file)
@@ -1,5 +1,5 @@
 /* .eh_frame section optimization.
-   Copyright (C) 2001-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2019 Free Software Foundation, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -797,6 +797,8 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info,
              while (*aug != '\0')
                switch (*aug++)
                  {
+                 case 'B':
+                   break;
                  case 'L':
                    REQUIRE (read_byte (&buf, end, &cie->lsda_encoding));
                    ENSURE_NO_RELOCS (buf);
@@ -1991,7 +1993,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
              || ent->u.cie.per_encoding_relative)
            {
              char *aug;
-             unsigned int action, extra_string, extra_data;
+             unsigned int version, action, extra_string, extra_data;
              unsigned int per_width, per_encoding;
 
              /* Need to find 'R' or 'L' augmentation's argument and modify
@@ -2002,13 +2004,17 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
              extra_string = extra_augmentation_string_bytes (ent);
              extra_data = extra_augmentation_data_bytes (ent);
 
-             /* Skip length, id and version.  */
-             buf += 9;
+             /* Skip length, id.  */
+             buf += 8;
+             version = *buf++;
              aug = (char *) buf;
              buf += strlen (aug) + 1;
              skip_leb128 (&buf, end);
              skip_leb128 (&buf, end);
-             skip_leb128 (&buf, end);
+             if (version == 1)
+               skip_bytes (&buf, end, 1);
+             else
+               skip_leb128 (&buf, end);
              if (*aug == 'z')
                {
                  /* The uleb128 will always be a single byte for the kind
This page took 0.03002 seconds and 4 git commands to generate.