mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-22 17:31:58 -05:00
bdfc77b725
This is what POSIX mandates and this also matches the behavior of modern Linux.
16 lines
259 B
C++
16 lines
259 B
C++
/*
|
|
* Copyright (c) 2024, Dan Klishch <danilklishch@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibTest/TestCase.h>
|
|
|
|
int f();
|
|
[[gnu::weak]] int f() { return 1; }
|
|
int g();
|
|
|
|
TEST_CASE(weak_symbol_resolution)
|
|
{
|
|
EXPECT_EQ(g(), 1);
|
|
}
|