mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 14:52:43 +00:00 
			
		
		
		
	 c9747a3236
			
		
	
	
		c9747a3236
		
	
	
	
	
		
			
			Multiboot only supports ELF32 executables. This changes the build process to build an ELF32 executable which has a 32-bit entry point, but consists of mostly 64-bit code.
		
			
				
	
	
		
			11 lines
		
	
	
	
		
			283 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
	
		
			283 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
| #!/bin/sh
 | |
| tmp=$(mktemp)
 | |
| if [ -f Kernel32 ]; then
 | |
|     kernel_binary=Kernel32
 | |
| else
 | |
|     kernel_binary=Kernel64
 | |
| fi
 | |
| nm -n $kernel_binary | awk '{ if ($2 != "a") print; }' | uniq > "$tmp"
 | |
| printf "%08x\n" "$(wc -l "$tmp" | cut -f1 -d' ')" > kernel.map
 | |
| cat "$tmp" >> kernel.map
 | |
| rm -f "$tmp"
 |