Silence the linker_relocation benchmark weak symbol warnings.

Test: treehugger
Change-Id: I617e82540ba5f22e237bde344d2b568a369692cd
diff --git a/benchmarks/linker_relocation/regen/gen_bench.py b/benchmarks/linker_relocation/regen/gen_bench.py
index d34a9a9..fa6f1a1 100755
--- a/benchmarks/linker_relocation/regen/gen_bench.py
+++ b/benchmarks/linker_relocation/regen/gen_bench.py
@@ -46,7 +46,7 @@
 from subprocess import PIPE, DEVNULL
 from pathlib import Path
 
-from common_types import LoadedLibrary, SymbolRef, SymKind, bfs_walk, json_to_elf_tree
+from common_types import LoadedLibrary, SymbolRef, SymBind, SymKind, bfs_walk, json_to_elf_tree
 
 
 g_obfuscate = True
@@ -195,15 +195,16 @@
             if not d.defined: continue
             sym = trans_sym(d.name, None)
             if sym is None: continue
+            binding = 'weak' if d.bind == SymBind.Weak else 'globl'
             if d.kind == SymKind.Func:
                 out.write('.text\n'
-                          f'.globl {sym}\n'
+                          f'.{binding} {sym}\n'
                           f'.type {sym},%function\n'
                           f'{sym}:\n'
                           'nop\n')
             else: # SymKind.Var
                 out.write('.data\n'
-                          f'.globl {sym}\n'
+                          f'.{binding} {sym}\n'
                           f'.type {sym},%object\n'
                           f'{sym}:\n'
                           f'.space __SIZEOF_POINTER__\n')