mirror of git://gcc.gnu.org/git/gcc.git
				
				
				
			elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the desired CRC is zero.
* elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the desired CRC is zero. (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo. From-SVN: r257062
This commit is contained in:
		
							parent
							
								
									a88d1f8bb2
								
							
						
					
					
						commit
						96f7c2a94a
					
				|  | @ -1,3 +1,9 @@ | ||||||
|  | 2018-01-25  Ian Lance Taylor  <iant@golang.org> | ||||||
|  | 
 | ||||||
|  | 	* elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the | ||||||
|  | 	desired CRC is zero. | ||||||
|  | 	(elf_add): Don't clear *found_sym and *found_dwarf if debuginfo. | ||||||
|  | 
 | ||||||
| 2018-01-25  Ian Lance Taylor  <iant@golang.org> | 2018-01-25  Ian Lance Taylor  <iant@golang.org> | ||||||
| 
 | 
 | ||||||
| 	* pecoff.c (coff_add): Only release syms_view if it is valid. | 	* pecoff.c (coff_add): Only release syms_view if it is valid. | ||||||
|  |  | ||||||
|  | @ -997,7 +997,6 @@ elf_open_debugfile_by_debuglink (struct backtrace_state *state, | ||||||
| 				 void *data) | 				 void *data) | ||||||
| { | { | ||||||
|   int ddescriptor; |   int ddescriptor; | ||||||
|   uint32_t got_crc; |  | ||||||
| 
 | 
 | ||||||
|   ddescriptor = elf_find_debugfile_by_debuglink (state, filename, |   ddescriptor = elf_find_debugfile_by_debuglink (state, filename, | ||||||
| 						 debuglink_name, | 						 debuglink_name, | ||||||
|  | @ -1005,11 +1004,16 @@ elf_open_debugfile_by_debuglink (struct backtrace_state *state, | ||||||
|   if (ddescriptor < 0) |   if (ddescriptor < 0) | ||||||
|     return -1; |     return -1; | ||||||
| 
 | 
 | ||||||
|   got_crc = elf_crc32_file (state, ddescriptor, error_callback, data); |   if (debuglink_crc != 0) | ||||||
|   if (got_crc != debuglink_crc) |  | ||||||
|     { |     { | ||||||
|       backtrace_close (ddescriptor, error_callback, data); |       uint32_t got_crc; | ||||||
|       return -1; | 
 | ||||||
|  |       got_crc = elf_crc32_file (state, ddescriptor, error_callback, data); | ||||||
|  |       if (got_crc != debuglink_crc) | ||||||
|  | 	{ | ||||||
|  | 	  backtrace_close (ddescriptor, error_callback, data); | ||||||
|  | 	  return -1; | ||||||
|  | 	} | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|   return ddescriptor; |   return ddescriptor; | ||||||
|  | @ -2634,8 +2638,11 @@ elf_add (struct backtrace_state *state, const char *filename, int descriptor, | ||||||
|   unsigned int using_debug_view; |   unsigned int using_debug_view; | ||||||
|   uint16_t *zdebug_table; |   uint16_t *zdebug_table; | ||||||
| 
 | 
 | ||||||
|   *found_sym = 0; |   if (!debuginfo) | ||||||
|   *found_dwarf = 0; |     { | ||||||
|  |       *found_sym = 0; | ||||||
|  |       *found_dwarf = 0; | ||||||
|  |     } | ||||||
| 
 | 
 | ||||||
|   shdrs_view_valid = 0; |   shdrs_view_valid = 0; | ||||||
|   names_view_valid = 0; |   names_view_valid = 0; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Ian Lance Taylor
						Ian Lance Taylor