GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — deps,test: update postject to 1.0.0-alpha.5 · nodejs/node@f8d4bf8

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • deps/postject
    • postject-api.h
  • test/fixtures/postject-copy
    • node_modules
      • .package-lock.json
      • postject
        • dist
          • api.js
          • cli.js
          • postject-api.h
        • package.json
    • package-lock.json
    • package.json
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎deps/postject/postject-api.h‎

Copy file name to clipboardExpand all lines: deps/postject/postject-api.h
+16-4Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#elif defined(__linux__)
1313
#include <elf.h>
1414
#include <link.h>
15-
#include <sys/auxv.h>
1615
#include <sys/param.h>
1716
#elif defined(_WIN32)
1817
#include <windows.h>
@@ -44,6 +43,16 @@ static inline bool postject_has_resource() {
4443
return sentinel[sizeof(POSTJECT_SENTINEL_FUSE)] == '1';
4544
}
4645

46+
#if defined(__linux__)
47+
static int postject__dl_iterate_phdr_callback(struct dl_phdr_info* info,
48+
size_t size,
49+
void* data) {
50+
// Snag the dl_phdr_info struct for the main program, then stop iterating
51+
*((struct dl_phdr_info*)data) = *info;
52+
return 1;
53+
}
54+
#endif
55+
4756
static const void* postject_find_resource(
4857
const char* name,
4958
size_t* size,
@@ -114,9 +123,12 @@ static const void* postject_find_resource(
114123
name = options->elf_section_name;
115124
}
116125

117-
uintptr_t p = getauxval(AT_PHDR);
118-
size_t n = getauxval(AT_PHNUM);
119-
uintptr_t base_addr = p - sizeof(ElfW(Ehdr));
126+
struct dl_phdr_info main_program_info;
127+
dl_iterate_phdr(postject__dl_iterate_phdr_callback, &main_program_info);
128+
129+
uintptr_t p = (uintptr_t)main_program_info.dlpi_phdr;
130+
size_t n = main_program_info.dlpi_phnum;
131+
uintptr_t base_addr = main_program_info.dlpi_addr;
120132

121133
// iterate program header
122134
for (; n > 0; n--, p += sizeof(ElfW(Phdr))) {
Collapse file

‎test/fixtures/postject-copy/node_modules/.package-lock.json‎

Copy file name to clipboardExpand all lines: test/fixtures/postject-copy/node_modules/.package-lock.json
+3-3Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎test/fixtures/postject-copy/node_modules/postject/dist/api.js‎

Copy file name to clipboardExpand all lines: test/fixtures/postject-copy/node_modules/postject/dist/api.js
+1-1Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎test/fixtures/postject-copy/node_modules/postject/dist/cli.js‎

Copy file name to clipboardExpand all lines: test/fixtures/postject-copy/node_modules/postject/dist/cli.js
+12-2Lines changed: 12 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎test/fixtures/postject-copy/node_modules/postject/dist/postject-api.h‎

Copy file name to clipboardExpand all lines: test/fixtures/postject-copy/node_modules/postject/dist/postject-api.h
+16-4Lines changed: 16 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎test/fixtures/postject-copy/node_modules/postject/package.json‎

Copy file name to clipboardExpand all lines: test/fixtures/postject-copy/node_modules/postject/package.json
+3-4Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎test/fixtures/postject-copy/package-lock.json‎

Copy file name to clipboardExpand all lines: test/fixtures/postject-copy/package-lock.json
+4-4Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎test/fixtures/postject-copy/package.json‎

Copy file name to clipboardExpand all lines: test/fixtures/postject-copy/package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
"author": "",
1111
"license": "ISC",
1212
"dependencies": {
13-
"postject": "^1.0.0-alpha.4"
13+
"postject": "^1.0.0-alpha.5"
1414
}
1515
}

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.