mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	objtool: Warn when disabling unreachable warnings
Print a warning when disabling the unreachable warnings (due to a GCC bug). This will help determine if recent GCCs still have the issue and alert us if any other issues might be silently lurking behind the unreachable disablement. Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/df243063787596e6031367e6659e7e43409d6c6d.1742852846.git.jpoimboe@kernel.org
This commit is contained in:
		
							parent
							
								
									ef753d6605
								
							
						
					
					
						commit
						eeff7ac615
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
					@ -3,6 +3,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <objtool/special.h>
 | 
					#include <objtool/special.h>
 | 
				
			||||||
#include <objtool/builtin.h>
 | 
					#include <objtool/builtin.h>
 | 
				
			||||||
 | 
					#include <objtool/warn.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define X86_FEATURE_POPCNT (4 * 32 + 23)
 | 
					#define X86_FEATURE_POPCNT (4 * 32 + 23)
 | 
				
			||||||
#define X86_FEATURE_SMAP   (9 * 32 + 20)
 | 
					#define X86_FEATURE_SMAP   (9 * 32 + 20)
 | 
				
			||||||
| 
						 | 
					@ -156,8 +157,10 @@ struct reloc *arch_find_switch_table(struct objtool_file *file,
 | 
				
			||||||
	 * indicates a rare GCC quirk/bug which can leave dead
 | 
						 * indicates a rare GCC quirk/bug which can leave dead
 | 
				
			||||||
	 * code behind.
 | 
						 * code behind.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	if (reloc_type(text_reloc) == R_X86_64_PC32)
 | 
						if (reloc_type(text_reloc) == R_X86_64_PC32) {
 | 
				
			||||||
 | 
							WARN_INSN(insn, "ignoring unreachables due to jump table quirk");
 | 
				
			||||||
		file->ignore_unreachables = true;
 | 
							file->ignore_unreachables = true;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	*table_size = 0;
 | 
						*table_size = 0;
 | 
				
			||||||
	return rodata_reloc;
 | 
						return rodata_reloc;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue