Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(578)

Side by Side Diff: bfd/elf.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « bfd/ecofflink.c ('k') | bfd/elf-attrs.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
None
OLDNEW
1 /* ELF executable support for BFD. 1 /* ELF executable support for BFD.
2 2
3 Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 3 Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
4 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 4 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
5 Free Software Foundation, Inc. 5 Free Software Foundation, Inc.
6 6
7 This file is part of BFD, the Binary File Descriptor library. 7 This file is part of BFD, the Binary File Descriptor library.
8 8
9 This program is free software; you can redistribute it and/or modify 9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or 11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version. 12 (at your option) any later version.
13 13
14 This program is distributed in the hope that it will be useful, 14 This program is distributed in the hope that it will be useful,
(...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 1018
1019 if (bfd_is_section_compressed (abfd, newsect)) 1019 if (bfd_is_section_compressed (abfd, newsect))
1020 { 1020 {
1021 /* Compressed section. Check if we should decompress. */ 1021 /* Compressed section. Check if we should decompress. */
1022 if ((abfd->flags & BFD_DECOMPRESS)) 1022 if ((abfd->flags & BFD_DECOMPRESS))
1023 action = decompress; 1023 action = decompress;
1024 } 1024 }
1025 else 1025 else
1026 { 1026 {
1027 /* Normal section. Check if we should compress. */ 1027 /* Normal section. Check if we should compress. */
1028 » if ((abfd->flags & BFD_COMPRESS)) 1028 » if ((abfd->flags & BFD_COMPRESS) && newsect->size != 0)
1029 action = compress; 1029 action = compress;
1030 } 1030 }
1031 1031
1032 new_name = NULL; 1032 new_name = NULL;
1033 switch (action) 1033 switch (action)
1034 { 1034 {
1035 case nothing: 1035 case nothing:
1036 break; 1036 break;
1037 case compress: 1037 case compress:
1038 if (!bfd_init_section_compress_status (abfd, newsect)) 1038 if (!bfd_init_section_compress_status (abfd, newsect))
1039 { 1039 {
1040 (*_bfd_error_handler) 1040 (*_bfd_error_handler)
1041 » » (_("%B: unable to initialize commpress status for section %s"), 1041 » » (_("%B: unable to initialize compress status for section %s"),
1042 abfd, name); 1042 abfd, name);
1043 return FALSE; 1043 return FALSE;
1044 } 1044 }
1045 if (name[1] != 'z') 1045 if (name[1] != 'z')
1046 { 1046 {
1047 unsigned int len = strlen (name); 1047 unsigned int len = strlen (name);
1048 1048
1049 new_name = bfd_alloc (abfd, len + 2); 1049 new_name = bfd_alloc (abfd, len + 2);
1050 if (new_name == NULL) 1050 if (new_name == NULL)
1051 return FALSE; 1051 return FALSE;
1052 new_name[0] = '.'; 1052 new_name[0] = '.';
1053 new_name[1] = 'z'; 1053 new_name[1] = 'z';
1054 memcpy (new_name + 2, name + 1, len); 1054 memcpy (new_name + 2, name + 1, len);
1055 } 1055 }
1056 break; 1056 break;
1057 case decompress: 1057 case decompress:
1058 if (!bfd_init_section_decompress_status (abfd, newsect)) 1058 if (!bfd_init_section_decompress_status (abfd, newsect))
1059 { 1059 {
1060 (*_bfd_error_handler) 1060 (*_bfd_error_handler)
1061 » » (_("%B: unable to initialize decommpress status for section %s") , 1061 » » (_("%B: unable to initialize decompress status for section %s"),
1062 abfd, name); 1062 abfd, name);
1063 return FALSE; 1063 return FALSE;
1064 } 1064 }
1065 if (name[1] == 'z') 1065 if (name[1] == 'z')
1066 { 1066 {
1067 unsigned int len = strlen (name); 1067 unsigned int len = strlen (name);
1068 1068
1069 new_name = bfd_alloc (abfd, len); 1069 new_name = bfd_alloc (abfd, len);
1070 if (new_name == NULL) 1070 if (new_name == NULL)
1071 return FALSE; 1071 return FALSE;
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
1636 hdr->sh_link = dynsymhdr->sh_link; 1636 hdr->sh_link = dynsymhdr->sh_link;
1637 break; 1637 break;
1638 } 1638 }
1639 } 1639 }
1640 } 1640 }
1641 } 1641 }
1642 break; 1642 break;
1643 1643
1644 case SHT_SYMTAB: /* A symbol table */ 1644 case SHT_SYMTAB: /* A symbol table */
1645 if (elf_onesymtab (abfd) == shindex) 1645 if (elf_onesymtab (abfd) == shindex)

error: old chunk mismatch

OLDNEW
« no previous file with comments | « bfd/ecofflink.c ('k') | bfd/elf-attrs.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698