This is a cross-port of r235098 by Tamas Berghammer <tberghammer@google.com>.
This patch fixes a critical bug in thumb symbol handling on ARM platforms.