mirror of
				https://source.denx.de/u-boot/u-boot.git
				synced 2025-11-04 02:11:25 +01:00 
			
		
		
		
	kallsyms: fix escaping of NUL char in strings
The current kallsyms code is using \\0 to escape the backslash in the awk code, but the shell too needs escaping. This way we make sure gcc is passed the \0. Then gcc itself will consume this as an octal, so we have to use 000 so gcc will create the final NUL. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
		
							parent
							
								
									3672cd5c3b
								
							
						
					
					
						commit
						7bd49ad12c
					
				
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							@ -352,7 +352,7 @@ GEN_UBOOT = \
 | 
				
			|||||||
$(obj)u-boot:		depend $(SUBDIRS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT)
 | 
					$(obj)u-boot:		depend $(SUBDIRS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT)
 | 
				
			||||||
		$(GEN_UBOOT)
 | 
							$(GEN_UBOOT)
 | 
				
			||||||
ifeq ($(CONFIG_KALLSYMS),y)
 | 
					ifeq ($(CONFIG_KALLSYMS),y)
 | 
				
			||||||
		smap=`$(call SYSTEM_MAP,u-boot) | awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\0"}'` ; \
 | 
							smap=`$(call SYSTEM_MAP,u-boot) | awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \
 | 
				
			||||||
		$(CC) $(CFLAGS) -DSYSTEM_MAP="\"$${smap}\"" -c common/system_map.c -o $(obj)common/system_map.o
 | 
							$(CC) $(CFLAGS) -DSYSTEM_MAP="\"$${smap}\"" -c common/system_map.c -o $(obj)common/system_map.o
 | 
				
			||||||
		$(GEN_UBOOT) $(obj)common/system_map.o
 | 
							$(GEN_UBOOT) $(obj)common/system_map.o
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user