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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 ( '(-t)', PassThrough), | 147 ( '(-t)', PassThrough), |
148 ( ('-y','(.*)'), PassThrough), | 148 ( ('-y','(.*)'), PassThrough), |
149 ( ('(-defsym)','(.*)'), PassThrough), | 149 ( ('(-defsym)','(.*)'), PassThrough), |
150 ( '-export-dynamic', PassThrough), | 150 ( '-export-dynamic', PassThrough), |
151 | 151 |
152 ( '(--print-gc-sections)', PassThrough), | 152 ( '(--print-gc-sections)', PassThrough), |
153 ( '(--gc-sections)', PassThrough), | 153 ( '(--gc-sections)', PassThrough), |
154 ( '(--unresolved-symbols=.*)', PassThrough), | 154 ( '(--unresolved-symbols=.*)', PassThrough), |
155 ( '(--dynamic-linker=.*)', PassThrough), | 155 ( '(--dynamic-linker=.*)', PassThrough), |
156 | 156 |
157 ( '-melf_nacl', "env.set('ARCH', 'X8632')"), | 157 ( '-melf_nacl', "env.set('ARCH', 'X8632')"), |
158 ( ('-m','elf_nacl'), "env.set('ARCH', 'X8632')"), | 158 ( ('-m','elf_nacl'), "env.set('ARCH', 'X8632')"), |
159 ( '-melf64_nacl', "env.set('ARCH', 'X8664')"), | 159 ( '-melf64_nacl', "env.set('ARCH', 'X8664')"), |
160 ( ('-m','elf64_nacl'), "env.set('ARCH', 'X8664')"), | 160 ( ('-m','elf64_nacl'), "env.set('ARCH', 'X8664')"), |
161 ( '-marmelf_nacl', "env.set('ARCH', 'ARM')"), | 161 ( '-marmelf_nacl', "env.set('ARCH', 'ARM')"), |
162 ( ('-m','armelf_nacl'), "env.set('ARCH', 'ARM')"), | 162 ( ('-m','armelf_nacl'), "env.set('ARCH', 'ARM')"), |
| 163 ( '-mmipselelf_nacl', "env.set('ARCH', 'MIPS32')"), |
| 164 ( ('-m','mipselelf_nacl'), "env.set('ARCH', 'MIPS32')"), |
163 | 165 |
164 # Inputs and options that need to be kept in order | 166 # Inputs and options that need to be kept in order |
165 ( '(--no-as-needed)', "env.append('INPUTS', $0)"), | 167 ( '(--no-as-needed)', "env.append('INPUTS', $0)"), |
166 ( '(--as-needed)', "env.append('INPUTS', $0)"), | 168 ( '(--as-needed)', "env.append('INPUTS', $0)"), |
167 ( '(--start-group)', "env.append('INPUTS', $0)"), | 169 ( '(--start-group)', "env.append('INPUTS', $0)"), |
168 ( '(--end-group)', "env.append('INPUTS', $0)"), | 170 ( '(--end-group)', "env.append('INPUTS', $0)"), |
169 ( '(-Bstatic)', "env.append('INPUTS', $0)"), | 171 ( '(-Bstatic)', "env.append('INPUTS', $0)"), |
170 ( '(-Bdynamic)', "env.append('INPUTS', $0)"), | 172 ( '(-Bdynamic)', "env.append('INPUTS', $0)"), |
171 # This is the file passed from llc during translation (used to be via shmem) | 173 # This is the file passed from llc during translation (used to be via shmem) |
172 ( ('--llc-translated-file=(.*)'), "env.append('INPUTS', $0)\n" | 174 ( ('--llc-translated-file=(.*)'), "env.append('INPUTS', $0)\n" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 def LinkerFiles(args): | 325 def LinkerFiles(args): |
324 ret = [] | 326 ret = [] |
325 for f in args: | 327 for f in args: |
326 if IsFlag(f): | 328 if IsFlag(f): |
327 continue | 329 continue |
328 else: | 330 else: |
329 if not pathtools.exists(f): | 331 if not pathtools.exists(f): |
330 Log.Fatal("Unable to open '%s'", pathtools.touser(f)) | 332 Log.Fatal("Unable to open '%s'", pathtools.touser(f)) |
331 ret.append(f) | 333 ret.append(f) |
332 return ret | 334 return ret |
OLD | NEW |