mierle

Joined 17 years ago

Karma
726
Submissions
51
Member since
Dec 28
Pigweed founder @ Google https://pigweed.dev

PIGWEED IS HIRING!!!

If you have experience in the embedded space and have an interest in bringing modern software practices to embedded, drop me a note or join our Discord: https://discord.gg/M9NSeTA

Examples of modern software practices we're bringing to embedded include unit testing, languages beyond C like C++ and Rust, binary comms over serial with a structured log & command UI instead of ad-hoc text based command prompts, web-style file watchers, fuzzing for security, sanitizers, automatic code formatting, and more.

Other stuff:

Author of libmv, the structure from motion library used in Blender's matchmoving system: http://code.google.com/p/libmv

One of the primary authors of Ceres Solver: http://code.google.com/p/ceres-solver

Blender contributor (parts of the motion tracking module): http://www.blender.org/

View on Hacker News

Recent submissions

Comment · 3 years ago
Comment · 3 years ago
Wow, it's cool to see astrometry.net get put to use! I worked on astrometry.net back in undergrad and grad school. If you have questions about how it works, I can answer them.

How does it work? astrometry.net uses 4-star combinations to define codes, then indexes the codes on the celestial sphere. The particulars of each of these phases matter, but that's the basic idea.

Comment · 4 years ago
Comment · 4 years ago
The key to understanding ELF is that it serves three purposes:

(1) Execution - A container describing how an OS can load and execute a binary

(2) Linking - A container with relocatable machine code; for the linker to assemble

(3) Metadata for debugging and other purposes like stack traces

Program headers describe "segments". Segments are for the execution time view of the ELF. They describe the parts of the file to load into memory regions, and the execution entry address. The program headers are what are read by the OS when running "./my_executable". The segments don't always have names. Also, it is confusing that "sections" and "segments" mean very different things, but that's just how it is.

Thus, program headers (and the segments they describe) are for #1 - Execution.

Sections are a link-time construct, leveraged by the linker, to decide how to allocate functions and data to the execution segments (via sections). Intermediate ELF object files contain relocatable code, where the code is allocated to sections (you can manually specify them if you want). Example sections include ".text", which is executable code; ".bss" which is zero-initialized static variables; ".data" which is pre-initialized static variables, and so on. You can see an example of sections being allocated to segments in this thoroughly described linker script [1]. Sections are mostly ignored during program execution.

Thus, section headers (and the sections they describe) are for #2 - Linking.

You aren't alone in not knowing these details about ELF. It wasn't until I got into the embedded space that I dug deep to understand linking and loading, linker scripts, and executable formats. These details are important to understand for microcontrollers since you may need to carefully allocate code to physical addresses that have faster memory (e.g. core coupled RAM), or put code in flash. In some cases you execute code directly out of flash (so must tell the linker that including physical addresses); but in other cases, you might need to load code into RAM (manually, there is no OS!) from flash since executing out of flash can be slow. On desktops and servers, it's rare to change (or even know about) linker scripts.

[1] https://blog.thea.codes/the-most-thoroughly-commented-linker...

Comment · 5 years ago
Valora made it easy for me to donate to a typhoon relief effort - https://doni.app/c/36/. The onboarding flow is well thought through. Valora is the first app that for me, feels like a crypto currency system that's usable by normal people. I suggest checking it out if you've interested in crypto but haven't given it a try yet.
Comment · 6 years ago
Comment · 6 years ago
Comment · 6 years ago
Comment · 6 years ago
Comment · 6 years ago
Comment · 7 years ago
First, assume a spherical car...
Comment · 8 years ago
I'm one of the founders of Ceres Solver; let me know if you need any help.
Comment · 9 years ago
Comment · 12 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton