mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	[SPARC]: Deal with glibc changing macro names in modpost.c
GLIBC 2.3.4 and later changed the STT_REGISTER macro to STT_SPARC_REGISTER, so we need to cope with that somehow. Original patch from fabbione, reposted by Ben Collins. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
		
							parent
							
								
									91aa9fb573
								
							
						
					
					
						commit
						8d5290149e
					
				
					 1 changed files with 7 additions and 2 deletions
				
			
		| 
						 | 
					@ -359,11 +359,16 @@ handle_modversions(struct module *mod, struct elf_info *info,
 | 
				
			||||||
		/* ignore __this_module, it will be resolved shortly */
 | 
							/* ignore __this_module, it will be resolved shortly */
 | 
				
			||||||
		if (strcmp(symname, MODULE_SYMBOL_PREFIX "__this_module") == 0)
 | 
							if (strcmp(symname, MODULE_SYMBOL_PREFIX "__this_module") == 0)
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
#ifdef STT_REGISTER
 | 
					/* cope with newer glibc (2.3.4 or higher) STT_ definition in elf.h */
 | 
				
			||||||
 | 
					#if defined(STT_REGISTER) || defined(STT_SPARC_REGISTER)
 | 
				
			||||||
 | 
					/* add compatibility with older glibc */
 | 
				
			||||||
 | 
					#ifndef STT_SPARC_REGISTER
 | 
				
			||||||
 | 
					#define STT_SPARC_REGISTER STT_REGISTER
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		if (info->hdr->e_machine == EM_SPARC ||
 | 
							if (info->hdr->e_machine == EM_SPARC ||
 | 
				
			||||||
		    info->hdr->e_machine == EM_SPARCV9) {
 | 
							    info->hdr->e_machine == EM_SPARCV9) {
 | 
				
			||||||
			/* Ignore register directives. */
 | 
								/* Ignore register directives. */
 | 
				
			||||||
			if (ELF_ST_TYPE(sym->st_info) == STT_REGISTER)
 | 
								if (ELF_ST_TYPE(sym->st_info) == STT_SPARC_REGISTER)
 | 
				
			||||||
				break;
 | 
									break;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue