blob: 5c7c45ca2fe3b5493ef522cc9af85828bd999b91 [file] [log] [blame]
#!/bin/sh
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This file wraps ld and ld.gold.
# In addition, it inserts hardened flags (-z now and -z relro) to the linker
# before invoking it.
#
# There is a similar wrapper around gcc that adds -fPIE, -fstack-protector-all,
# -D_FORTIFY_SOURCE=2 and -pie to the compile command line.
exec "$(readlink -f "${0}").real" -z now -z relro "$@"