1/* Copyright 2017 The Fuchsia Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
4 */
5
6/*
7 * The C++ compiler generates a reference to this symbol for each static
8 * destructor registered via __cxa_atexit.  In our implementation, there is
9 * no need for it, so just define the symbol away rather than wasting a
10 * data word defining it as a real variable somewhere.  See
11 * third_party/ulib/musl/src/exit/atexit.c for a more detailed explanation.
12 *
13 * LLD doesn't like it when this uses 0, because it makes that SHN_ABS and
14 * then is broken about handling STV_HIDDEN SHN_ABS symbols; it defines
15 * __ehdr_start as not SHN_ABS (though SHN_ABS is the only thing that
16 * actually makes sense for it), so that avoids the problem.
17 */
18PROVIDE_HIDDEN(__dso_handle = __ehdr_start);
19