EM codes cleanup to support big endian on Linux

Signed-off-by: Yunlu Zhang <Yunlu.Zhang@synopsys.com>