| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 # | 5 # |
| 6 # | 6 # |
| 7 # This is a thin wrapper for native LD. This is not meant to be | 7 # This is a thin wrapper for native LD. This is not meant to be |
| 8 # used by the user, but is called from pnacl-translate. | 8 # used by the user, but is called from pnacl-translate. |
| 9 # This implements the native linking part of translation. | 9 # This implements the native linking part of translation. |
| 10 # | 10 # |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 'NEEDED_LIBRARIES': '', | 85 'NEEDED_LIBRARIES': '', |
| 86 | 86 |
| 87 'EMITMODE' : '${RELOCATABLE ? relocatable : ' + | 87 'EMITMODE' : '${RELOCATABLE ? relocatable : ' + |
| 88 '${STATIC ? static : ' + | 88 '${STATIC ? static : ' + |
| 89 '${SHARED ? shared : dynamic}}}', | 89 '${SHARED ? shared : dynamic}}}', |
| 90 | 90 |
| 91 'LD_EMUL' : '${LD_EMUL_%ARCH%}', | 91 'LD_EMUL' : '${LD_EMUL_%ARCH%}', |
| 92 'LD_EMUL_ARM' : 'armelf_nacl', | 92 'LD_EMUL_ARM' : 'armelf_nacl', |
| 93 'LD_EMUL_X8632' : 'elf_nacl', | 93 'LD_EMUL_X8632' : 'elf_nacl', |
| 94 'LD_EMUL_X8664' : 'elf64_nacl', | 94 'LD_EMUL_X8664' : 'elf64_nacl', |
| 95 'LD_EMUL_MIPS32' : 'elf32ltsmip_nacl', |
| 95 | 96 |
| 96 'SEARCH_DIRS' : '${SEARCH_DIRS_USER} ${SEARCH_DIRS_BUILTIN}', | 97 'SEARCH_DIRS' : '${SEARCH_DIRS_USER} ${SEARCH_DIRS_BUILTIN}', |
| 97 'SEARCH_DIRS_USER' : '', | 98 'SEARCH_DIRS_USER' : '', |
| 98 'SEARCH_DIRS_BUILTIN': '${STDLIB ? ${LIBS_ARCH}/}', | 99 'SEARCH_DIRS_BUILTIN': '${STDLIB ? ${LIBS_ARCH}/}', |
| 99 | 100 |
| 100 'LIBS_ARCH' : '${LIBS_%ARCH%}', | 101 'LIBS_ARCH' : '${LIBS_%ARCH%}', |
| 101 'LIBS_ARM' : '${BASE_LIB_NATIVE}arm', | 102 'LIBS_ARM' : '${BASE_LIB_NATIVE}arm', |
| 102 'LIBS_X8632' : '${BASE_LIB_NATIVE}x86-32', | 103 'LIBS_X8632' : '${BASE_LIB_NATIVE}x86-32', |
| 103 'LIBS_X8664' : '${BASE_LIB_NATIVE}x86-64', | 104 'LIBS_X8664' : '${BASE_LIB_NATIVE}x86-64', |
| 105 'LIBS_MIPS32' : '${BASE_LIB_NATIVE}mips32', |
| 104 | 106 |
| 105 # Note: this is only used in the unsandboxed case | 107 # Note: this is only used in the unsandboxed case |
| 106 'RUN_LD' : '${LD} ${LD_FLAGS} ${inputs} -o ${output}' + | 108 'RUN_LD' : '${LD} ${LD_FLAGS} ${inputs} -o ${output}' + |
| 107 '${#METADATA_FILE ? --metadata ${METADATA_FILE}}', | 109 '${#METADATA_FILE ? --metadata ${METADATA_FILE}}', |
| 108 } | 110 } |
| 109 | 111 |
| 110 def PassThrough(*args): | 112 def PassThrough(*args): |
| 111 env.append('LD_FLAGS', *args) | 113 env.append('LD_FLAGS', *args) |
| 112 | 114 |
| 113 LDPatterns = [ | 115 LDPatterns = [ |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 def LinkerFiles(args): | 323 def LinkerFiles(args): |
| 322 ret = [] | 324 ret = [] |
| 323 for f in args: | 325 for f in args: |
| 324 if IsFlag(f): | 326 if IsFlag(f): |
| 325 continue | 327 continue |
| 326 else: | 328 else: |
| 327 if not pathtools.exists(f): | 329 if not pathtools.exists(f): |
| 328 Log.Fatal("Unable to open '%s'", pathtools.touser(f)) | 330 Log.Fatal("Unable to open '%s'", pathtools.touser(f)) |
| 329 ret.append(f) | 331 ret.append(f) |
| 330 return ret | 332 return ret |
| OLD | NEW |