title: Linker (ld) fails to produce output file?
body: <p>I'm getting a strange error while trying to build Chromium on Mac.  I've tracked the problem down to the following block of code, which is in a script called <a href="http://www.oschina.net/code/explore/WebKit-r74228/WebCore/WebCore.gyp/mac/adjust_visibility.sh" rel="nofollow">adjust_visibility.sh</a>.</p>
  
  <pre><code>  NEW_OBJECT="${OBJECT}.new"
    ld -o "${NEW_OBJECT}" -r "${OBJECT}" \
      -exported_symbols_list /dev/null -keep_private_externs
    mv "${NEW_OBJECT}" "${OBJECT}"
  </code></pre>
  
  <p>The script fails on the last line, where <code>mv</code> claims that the file <code>${NEW_OBJECT}</code> doesn't exist.  <code>${NEW_OBJECT}</code> should have been created by the linker command right above, but for some reason this isn't happening.  The linker doesn't produce the new file, but it also doesn't print any errors or warnings.  </p>
  
  <p>I know there's no problem with the linker itself -- when I run similar commands in the terminal they work fine.  The problem must have something to do with the environment that the script's executing in.</p>
  
  <p>Does anyone have any idea why this linker command isn't working properly?</p>