Skip to content

Instantly share code, notes, and snippets.

View jlevon's full-sized avatar

John Levon jlevon

View GitHub Profile
@jlevon
jlevon / gist:0dcda36103380125f59aa2d6c80d3027
Created February 19, 2020 17:02
binutils and _start_crt relocations in crt1.o
OI hipster:
jlevon:~ $ gas --version
GNU assembler (GNU Binutils) 2.32
$ gcc -m64 -G -o b.so b.c
$ elfdump -r b.so
...
R_AMD64_JUMP_SLOT 0x115a0 0 .rela.plt _start_crt
@jlevon
jlevon / gist:4aa07ceaf5fef64092f4cfea82efb2c0
Created February 18, 2020 10:51
default rust struct initialization
44 let identities = sesclient
45 .send_email(rusoto_ses::SendEmailRequest {
46 destination: rusoto_ses::Destination {
47 to_addresses: Some(vec!["levon@movementarian.org".to_string()]),
48 ..rusoto_ses::Destination::default()
49 },
50 message: rusoto_ses::Message {
51 subject: rusoto_ses::Content {
52 data: "Test message".to_string(),
53 ..rusoto_ses::Content::default()
# add fs /var/tmp/global
not ok 183 VM has no filesystems
---
type: AssertionError
message: VM has no filesystems
code: ~
errno: ~
file: /usr/vm/node_modules/vminfod/client.js
line: 292
column: 13
]$ /opt/smartdc/muppet/build/haproxy/sbin/haproxy -vv
HA-Proxy version 2.0.9 2019/11/15 - https://haproxy.org/
Build options :
TARGET = solaris
CPU = generic
CC = gcc
CFLAGS = -O2 -g -fno-strict-aliasing -Wdeclaration-after-statement -fwrapv -Wno-format-truncation -Wno-unused-label -Wno-sign-compare -Wno-unused-parameter -Wno-old-style-declaration -Wno-ignored-qualifiers -Wno-clobbered -Wno-missing-field-initializers -Wno-implicit-fallthrough -Wno-stringop-overflow -Wtype-limits -Wshift-negative-value -Wshift-overflow=2 -Wduplicated-cond -Wnull-dereference -DFD_SETSIZE=65536 -D_REENTRANT -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ -D_XPG6
OPTIONS = USE_OPENSSL=1
Feature list : -EPOLL -KQUEUE -MY_EPOLL -MY_SPLICE -NETFILTER -PCRE -PCRE_JIT -PCRE2 -PCRE2_JIT +POLL -PRIVATE_CACHE +THREAD -PTHREAD_PSHARED -REGPARM -STATIC_PCRE -STATIC_PCRE2 +TPROXY -LINUX_TPROXY -LINUX_SPLICE +LIBCRYPT +CRYPT_H -VSYSCALL +GETADDRINFO +OPENSSL -LUA -FUTEX -ACCEPT4 -MY_ACCEPT4 -ZLIB -SLZ -CPU_AFFINITY -TFO -NS -DL +R
@jlevon
jlevon / loader-fail.png
Last active December 17, 2019 14:51
loader failure with old OI pool
see image
jlevon@sent:~$ cat rpool.props
NAME PROPERTY VALUE SOURCE
rpool size 119G -
rpool capacity 83% -
rpool altroot - default
rpool health ONLINE -
rpool guid 17603400736575128424 default
rpool version - default
@jlevon
jlevon / bootfail.png
Last active December 11, 2019 18:02
loader boot failures
bootfail.png
/home/gk/src/master/proto.strap/usr/gcc/7/bin/gcc -dumpspecs>specs
...
*startfile_arch:
%{std=c1x|std=gnu1x:values-Xc.o%s values-xpg6.o%s; std=c11|std=gnu11:values-Xc.o%s values-xpg6.o%s; std=c99|std=gnu99:values-Xc.o%s values-xpg6.o%s; std=c9x|std=gnu9x:values-Xc.o%s values-xpg6.o%s; std=c++0x|std=gnu++0x:values-Xc.o%s; std=c++11|std=gnu++11:values-Xc.o%s; std=c++03|std=gnu++03:values-Xc.o%s; :values-Xa.o%s}
...
f905ddb5-9113-c52a-d3ce-d0db83321d72:lib $ echo '#include <sys/feature_tests.h>' | /home/gk/src/master/proto.strap/usr/gcc/7/bin/gcc -std=c99 -dM -E - >a.h
f905ddb5-9113-c52a-d3ce-d0db83321d72:lib $ grep SOURCE a.h
f905ddb5-9113-c52a-d3ce-d0db83321d72:lib $ grep XOPEN a.h
@jlevon
jlevon / gist:cda8c388c18ea37954a63c102c044a24
Created December 10, 2019 15:04
tickless powertop output
before (joyent_20191029T174340Z):
C-states (idle power) Avg Residency P-states (frequencies)
C0 (cpu running) (2.6%) 1200 Mhz 99.6%
C1 2.2ms (97.4%) 1300 Mhz 0.0%
1400 Mhz 0.0%
1500 Mhz 0.0%
1600 Mhz 0.0%
1700 Mhz 0.0%
1800 Mhz 0.0%
@jlevon
jlevon / bios.png
Last active December 5, 2019 17:06
Dell R730 console redirection
bios.png
{
"timers": {
"earlySetup": 15,
"parseDate": 10,
"parseQueryString": 8,
"authorizationParser": 81,
"checkIfPresigned": 3,
"ensureDependencies": 7,
"_authSetup": 4,
"preSignedUrl": 6,