From fbcde6bd4634ddc832524746e15bd333abffe9e5 Mon Sep 17 00:00:00 2001
From: clc5q <clc5q@git.zephyr-software.com>
Date: Thu, 19 May 2016 00:29:36 +0000
Subject: [PATCH] Increase x86-64 entropy to 52 bits.

Former-commit-id: c42b557c83c2007d6e1a04696e2513ebb2810d33
---
 tools/spasm/spasm.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/spasm/spasm.cpp b/tools/spasm/spasm.cpp
index 4745315f4..217aadc57 100755
--- a/tools/spasm/spasm.cpp
+++ b/tools/spasm/spasm.cpp
@@ -195,10 +195,11 @@ void a2bspri(const vector<string> &input,const string &outFilename, const string
 	else	
 		srand(getpid());
 
-	/* make start at 0xff00000000000000 for x86-64 */
+	/* make start at FF0xxxxxxxxxxxxxxxxx for x86-64 */
 	if(elfiop.get_class()==ELFCLASS64) 
 	{
 		bits=64;
+      vpc += (rand() & 0x000fffff);
 		vpc<<=32;
 		vpc += rand();
 	}
-- 
GitLab