Skip to content

Commit

Permalink
Merge branch 'develop' into fedora-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
hariharan-devarajan authored Dec 16, 2023
2 parents 9b1f3ae + bf5d3d6 commit f02c6a7
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04 ]
os: [ubuntu-20.04, ubuntu-22.04]

name: ${{ matrix.os }}

Expand Down
2 changes: 1 addition & 1 deletion src/gotcha_auxv.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ struct link_map *get_vdso_from_auxv() {

ElfW(Phdr) *vdso_phdrs = NULL;
ElfW(Half) vdso_phdr_num, p;
ElfW(Addr) vdso_dynamic;
ElfW(Addr) vdso_dynamic = 0;

parse_auxv_contents();
if (vdso_ehdr) {
Expand Down
2 changes: 1 addition & 1 deletion test/hammer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set(XSIZE 1)
set(YSIZE 1)

set(CMAKE_BUILD_TYPE Debug)
SET(CMAKE_CXX_FLAGS_DEBUG " ${CMAKE_CXX_FLAGS_DEBUG} -O0 -Wall -Werror -Wextra")
SET(CMAKE_CXX_FLAGS_DEBUG " ${CMAKE_CXX_FLAGS_DEBUG} -Wall -Werror -Wextra")

add_definitions(-DXSIZE=${XSIZE})
add_definitions(-DYSIZE=${YSIZE})
Expand Down
9 changes: 4 additions & 5 deletions test/symver/retX_new.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ for more details. You should have received a copy of the GNU Lesser General
Public License along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include "sym_macro.h"
// clang-format off
SYMVER_ATTRIBUTE(retX_new, retX@@GOTCHA_2)
int retX_new(int x) { return x; }
__asm__(
"\t.globl __retX_new\n"
"\t.equiv __retX_new,retX_new\n"
"\t.symver __retX_new,retX@@GOTCHA_2");
// clang-format on
8 changes: 4 additions & 4 deletions test/symver/retX_old.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ for more details. You should have received a copy of the GNU Lesser General
Public License along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "sym_macro.h"

// clang-format off
SYMVER_ATTRIBUTE(retX_old, retX@GOTCHA_1)
int retX_old(int x) { return -x; }
__asm__(
"\t.globl __retX_old\n"
"\t.equiv __retX_old,retX_old\n"
"\t.symver __retX_old,retX@GOTCHA_1");
// clang-format on
16 changes: 16 additions & 0 deletions test/symver/sym_macro.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#ifndef GOTCHA_SYM_MACRO_H
#define GOTCHA_SYM_MACRO_H
#ifdef __has_attribute
#if __has_attribute(__symver__)
#define SYMVER_ATTRIBUTE(sym, symver) __attribute__((__symver__(#symver)))
#endif
#endif
#ifndef SYMVER_ATTRIBUTE
#define SYMVER_ATTRIBUTE(sym, symver) \
__asm__("\t.globl __" #sym \
"\n" \
"\t.equiv __" #sym "," #sym \
"\n" \
"\t.symver __" #sym "," #symver);
#endif
#endif // GOTCHA_SYM_MACRO_H

0 comments on commit f02c6a7

Please sign in to comment.