diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2020-05-04 15:16:26 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-05-04 15:16:26 +0000 |
commit | 645e4f02c622ba67eb754000cc00c9db8be31f85 (patch) | |
tree | e4f5146b658792505069f05203d41436ad9f5bdb | |
parent | 29ed82dad09f7255485814cc34e520dc2d0ebb54 (diff) | |
parent | 6c302fcee964f2adff3447046f5fb4856b07d2a6 (diff) | |
download | nasm-emu-34-2-release.tar.gz |
Merge "Fix linker issue on MacOS" into emu-master-devnetsim-devemu-prebuiltsemu-master-devemu-35-1-releaseemu-34-releaseemu-34-devemu-34-3-releaseemu-34-2-releaseemu-34-2-devemu-33-releaseemu-33-devemu-32-releaseemu-32-devemu-31-stable-releaseemu-31-releaseemu-30-releaseaosp-emu-34-devaosp-emu-30-release
-rw-r--r-- | nasmlib/zerobuf.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/nasmlib/zerobuf.c b/nasmlib/zerobuf.c index 651c0fd4..cb35af52 100644 --- a/nasmlib/zerobuf.c +++ b/nasmlib/zerobuf.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- * - * + * * Copyright 1996-2016 The NASM Authors - All Rights Reserved * See the file AUTHORS included with the NASM distribution for * the specific copyright holders. @@ -14,7 +14,7 @@ * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF @@ -38,5 +38,7 @@ #include "compiler.h" #include "nasmlib.h" -/* Uninitialized -> all zero by C spec */ -const uint8_t zero_buffer[ZERO_BUF_SIZE]; +/* Explicitly initialize buffer, as some linkers will drop common symbols + (See https://stackoverflow.com/questions/28464770) +*/ +const uint8_t zero_buffer[ZERO_BUF_SIZE] = {0};
\ No newline at end of file |