Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abseil-cpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
abseil-cpp
Commits
c5a424a2
Unverified
Commit
c5a424a2
authored
Mar 08, 2022
by
Thomas Klausner
Committed by
GitHub
Mar 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add NetBSD support (#1121)
parent
f9b99ade
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
2 deletions
+16
-2
absl/base/config.h
+3
-2
absl/debugging/internal/elf_mem_image.cc
+4
-0
absl/debugging/internal/vdso_support.cc
+9
-0
No files found.
absl/base/config.h
View file @
c5a424a2
...
...
@@ -414,7 +414,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
defined(_AIX) || defined(__ros__) || defined(__native_client__) || \
defined(__asmjs__) || defined(__wasm__) || defined(__Fuchsia__) || \
defined(__sun) || defined(__ASYLO__) || defined(__myriad2__) || \
defined(__HAIKU__) || defined(__OpenBSD__)
defined(__HAIKU__) || defined(__OpenBSD__)
|| defined(__NetBSD__)
#define ABSL_HAVE_MMAP 1
#endif
...
...
@@ -425,7 +425,8 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
#ifdef ABSL_HAVE_PTHREAD_GETSCHEDPARAM
#error ABSL_HAVE_PTHREAD_GETSCHEDPARAM cannot be directly set
#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
defined(_AIX) || defined(__ros__) || defined(__OpenBSD__)
defined(_AIX) || defined(__ros__) || defined(__OpenBSD__) || \
defined(__NetBSD__)
#define ABSL_HAVE_PTHREAD_GETSCHEDPARAM 1
#endif
...
...
absl/debugging/internal/elf_mem_image.cc
View file @
c5a424a2
...
...
@@ -351,7 +351,11 @@ void ElfMemImage::SymbolIterator::Update(int increment) {
const
ElfW
(
Versym
)
*
version_symbol
=
image
->
GetVersym
(
index_
);
ABSL_RAW_CHECK
(
symbol
&&
version_symbol
,
""
);
const
char
*
const
symbol_name
=
image
->
GetDynstr
(
symbol
->
st_name
);
#if defined(__NetBSD__)
const
int
version_index
=
version_symbol
->
vs_vers
&
VERSYM_VERSION
;
#else
const
ElfW
(
Versym
)
version_index
=
version_symbol
[
0
]
&
VERSYM_VERSION
;
#endif
const
ElfW
(
Verdef
)
*
version_definition
=
nullptr
;
const
char
*
version_name
=
""
;
if
(
symbol
->
st_shndx
==
SHN_UNDEF
)
{
...
...
absl/debugging/internal/vdso_support.cc
View file @
c5a424a2
...
...
@@ -50,6 +50,10 @@
#define AT_SYSINFO_EHDR 33 // for crosstoolv10
#endif
#if defined(__NetBSD__)
using
Elf32_auxv_t
=
Aux32Info
;
using
Elf64_auxv_t
=
Aux64Info
;
#endif
#if defined(__FreeBSD__)
#if defined(__ELF_WORD_SIZE) && __ELF_WORD_SIZE == 64
using
Elf64_auxv_t
=
Elf64_Auxinfo
;
...
...
@@ -106,8 +110,13 @@ const void *VDSOSupport::Init() {
ElfW
(
auxv_t
)
aux
;
while
(
read
(
fd
,
&
aux
,
sizeof
(
aux
))
==
sizeof
(
aux
))
{
if
(
aux
.
a_type
==
AT_SYSINFO_EHDR
)
{
#if defined(__NetBSD__)
vdso_base_
.
store
(
reinterpret_cast
<
void
*>
(
aux
.
a_v
),
std
::
memory_order_relaxed
);
#else
vdso_base_
.
store
(
reinterpret_cast
<
void
*>
(
aux
.
a_un
.
a_val
),
std
::
memory_order_relaxed
);
#endif
break
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment