Fix baremetal build

TARGET2 relocations behave differently between bare-metal and linux.