Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/bfd/elf-eh-frame.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 20 by monamour, Thu Dec 4 05:12:56 2008 UTC revision 21 by monamour, Mon Jul 27 20:34:36 2009 UTC
# Line 24  Line 24 
24  #include "bfd.h"  #include "bfd.h"
25  #include "libbfd.h"  #include "libbfd.h"
26  #include "elf-bfd.h"  #include "elf-bfd.h"
27  #include "elf/dwarf2.h"  #include "dwarf2.h"
28    
29  #define EH_FRAME_HDR_SIZE 8  #define EH_FRAME_HDR_SIZE 8
30    
# Line 549  _bfd_elf_parse_eh_frame (bfd *abfd, stru Line 549  _bfd_elf_parse_eh_frame (bfd *abfd, stru
549               < (bfd_size_type) ((buf) - ehbuf)))        \               < (bfd_size_type) ((buf) - ehbuf)))        \
550      cookie->rel++      cookie->rel++
551    
 #define REQUIRE_CLEARED_RELOCS(buf)                     \  
   while (cookie->rel < cookie->relend                   \  
          && (cookie->rel->r_offset                      \  
              < (bfd_size_type) ((buf) - ehbuf)))        \  
     {                                                   \  
       REQUIRE (cookie->rel->r_info == 0);               \  
       REQUIRE (cookie->rel->r_addend == 0);             \  
       cookie->rel++;                                    \  
     }  
   
552  #define GET_RELOC(buf)                                  \  #define GET_RELOC(buf)                                  \
553    ((cookie->rel < cookie->relend                        \    ((cookie->rel < cookie->relend                        \
554      && (cookie->rel->r_offset                           \      && (cookie->rel->r_offset                           \
# Line 817  _bfd_elf_parse_eh_frame (bfd *abfd, stru Line 807  _bfd_elf_parse_eh_frame (bfd *abfd, stru
807    
808            buf = last_fde + 4 + hdr_length;            buf = last_fde + 4 + hdr_length;
809    
810            /* Cleared FDE?  The instructions will not be cleared but verify all            /* For NULL RSEC (cleared FDE belonging to a discarded section)
811               the relocation entries for them are cleared.  */               the relocations are commonly cleared.  We do not sanity check if
812            if (rsec == NULL)               all these relocations are cleared as (1) relocations to
813              {               .gcc_except_table will remain uncleared (they will get dropped
814                REQUIRE_CLEARED_RELOCS (buf);               with the drop of this unused FDE) and (2) BFD already safely drops
815              }               relocations of any type to .eh_frame by
816            else               elf_section_ignore_discarded_relocs.
817              {               TODO: The .gcc_except_table entries should be also filtered as
818                SKIP_RELOCS (buf);               .eh_frame entries; or GCC could rather use COMDAT for them.  */
819              }            SKIP_RELOCS (buf);
820          }          }
821    
822        /* Try to interpret the CFA instructions and find the first        /* Try to interpret the CFA instructions and find the first

Legend:
Removed from v.20  
changed lines
  Added in v.21

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26