mirror of
				https://github.com/netwide-assembler/nasm.git
				synced 2025-10-10 00:25:06 -04:00 
			
		
		
		
	output: maco 64 -- Fix get_closest_section_symbol_by_offset
- fixup comparision it should be GE - make sure we never return nil here Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
		| @@ -304,12 +304,16 @@ static struct symbol *get_closest_section_symbol_by_offset(uint8_t fileindex, in | |||||||
|  |  | ||||||
|     for (sym = syms; sym; sym = sym->next) { |     for (sym = syms; sym; sym = sym->next) { | ||||||
|         if ((sym->sect != NO_SECT) && (sym->sect == fileindex)) { |         if ((sym->sect != NO_SECT) && (sym->sect == fileindex)) { | ||||||
|             if ((int64_t)sym->value > offset) |             if ((int64_t)sym->value >= offset) | ||||||
|                 break; |                 break; | ||||||
|             nearest = sym; |             nearest = sym; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     if (!nearest) | ||||||
|  |         nasm_error(ERR_FATAL, "No section for index %x offset %llx found\n", | ||||||
|  |                    fileindex, (long long)offset); | ||||||
|  |  | ||||||
|     return nearest; |     return nearest; | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user