chris.bracken.jp

Statically generated site for chris.bracken.jp
git clone https://git.bracken.jp/chris.bracken.jp.git
Log | Files | Refs

index.xml (60260B)


      1 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
      2 <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      3   <channel>
      4     <title>Software on Chris Bracken</title>
      5     <link>https://chris.bracken.jp/tags/software/</link>
      6     <description>Recent content in Software on Chris Bracken</description>
      7     <generator>Hugo -- gohugo.io</generator>
      8     <language>en</language>
      9     <lastBuildDate>Fri, 22 May 2020 14:55:23 -0700</lastBuildDate><atom:link href="https://chris.bracken.jp/tags/software/index.xml" rel="self" type="application/rss+xml" />
     10     <item>
     11       <title>Thoughts on Licences</title>
     12       <link>https://chris.bracken.jp/2020/05/thoughts-on-licences/</link>
     13       <pubDate>Fri, 22 May 2020 14:55:23 -0700</pubDate>
     14       
     15       <guid>https://chris.bracken.jp/2020/05/thoughts-on-licences/</guid>
     16       <description>&lt;p&gt;Software licences are probably the single most boring aspect of software
     17 development, but it&amp;rsquo;s important to carefully consider the terms under which the
     18 stuff I hack on is shared to ensure they&amp;rsquo;re consistent with my values. Despite
     19 my general dislike for all things legalistic, the most unambiguous way to state
     20 those terms is through a licence. So a couple days ago, I tossed LICENSE files
     21 into any of my public &lt;a href=&#34;https://chris.bracken.jp/code&#34;&gt;repos&lt;/a&gt; that didn&amp;rsquo;t already have one.&lt;/p&gt;
     22 &lt;p&gt;So how did I settle on which licences to apply? Jump on into the DeLorean and
     23 let&amp;rsquo;s set the dial back to the late 1980s.&lt;/p&gt;
     24 &lt;p&gt;It&amp;rsquo;s 1986 and I&amp;rsquo;ve got a 1200 baud modem wired up to a beat-up 286 with a steel
     25 case that would easily allow it to double as a boat anchor if needed.  Armed
     26 with a dot-matrix printout of local BBSes with names like Camelot, Tommy&amp;rsquo;s
     27 Holiday Camp, and Forbidden Night Castle, I fire up PC-Talk. A series of
     28 &lt;a href=&#34;https://www.windytan.com/2012/11/the-sound-of-dialup-pictured.html&#34;&gt;high-pitched squeals and tones&lt;/a&gt; fill the air, then text
     29 flashes across the screen. I&amp;rsquo;m online.&lt;/p&gt;
     30 &lt;p&gt;BBSes were a treasure trove of information, filled to the brim with zip archives
     31 full of downloadable programs, source code, patches for existing programs, and
     32 all manner of text files with names like &lt;a href=&#34;https://insecure.org/stf/smashstack.html&#34;&gt;Smashing The Stack For Fun And
     33 Profit&lt;/a&gt;. You could find everything from how to crack copy-protected
     34 software, to details on phone phreaking, to how to make nitroglycerine from
     35 commonly-available household items. It was through BBSes that I first downloaded
     36 an I&amp;rsquo;m sure &lt;em&gt;totally legitimate&lt;/em&gt; copy of Borland Turbo C++ and took my first
     37 baby steps writing &lt;em&gt;real&lt;/em&gt; programs. No more BASIC for me.&lt;/p&gt;
     38 &lt;p&gt;This culture of open sharing in the online world has had a huge impact on me.
     39 From those early experiences with BBSes to my first forays onto the Internet a
     40 few years later, seeing people openly sharing code and patches and helping each
     41 other solve problems over Usenet seemed almost revolutionary to me at the time.
     42 In some ways, it still does. I feel lucky to have been a part of it from such an
     43 early age.&lt;/p&gt;
     44 &lt;p&gt;The end result is that I try to publicly share all the work I do. So when it
     45 came time to chuck licences on stuff, I sat down to work out a personals ad for
     46 my ideal licence. Aside from enjoying long walks on the beach, it should:&lt;/p&gt;
     47 &lt;ol&gt;
     48 &lt;li&gt;Allow free use, modification, and distribution both of the original
     49 work and any derived works.&lt;/li&gt;
     50 &lt;li&gt;Require that people distributing the work or any derived work to
     51 give appropriate credit.&lt;/li&gt;
     52 &lt;li&gt;Disallow suggesting that I in any way endorse any derived products
     53 or whoever produces them.&lt;/li&gt;
     54 &lt;li&gt;Gently encourage a culture of open exchange and sharing of
     55 information and techniques.&lt;/li&gt;
     56 &lt;li&gt;Be short, clear, and easy to understand.&lt;/li&gt;
     57 &lt;/ol&gt;
     58 &lt;p&gt;On the software side, there were lots of options, but the best matches in my
     59 mind are the &lt;a href=&#34;https://opensource.org/licenses/MIT&#34;&gt;MIT&lt;/a&gt; or &lt;a href=&#34;https://opensource.org/licenses/BSD-3-Clause&#34;&gt;BSD&lt;/a&gt; licences. The 3-clause
     60 &amp;rsquo;new&amp;rsquo; BSD licence has an advantage in that it required written permission from
     61 the author to use their name in any endorsement/promotion of a derived work.
     62 That happens to be what we already use for &lt;a href=&#34;https://github.com/flutter/flutter&#34;&gt;work&lt;/a&gt;.&lt;/p&gt;
     63 &lt;p&gt;On the content side, I&amp;rsquo;ve always posted my web site&amp;rsquo;s content under a &lt;a href=&#34;https://creativecommons.org/licenses/by-sa/4.0/&#34;&gt;Creative
     64 Commons Attribution-ShareAlike&lt;/a&gt; licence.  But I don&amp;rsquo;t believe that&amp;rsquo;s
     65 actually the ideal match based on my priorities. Why is it that I&amp;rsquo;ve elected to
     66 use a licence that requires that derived works also be licensed under the same
     67 terms rather than under whatever terms someone feels like, so long as
     68 acknowledgement is given? In the end I settled on the more permissive &lt;a href=&#34;https://creativecommons.org/licenses/by/4.0/&#34;&gt;Creative
     69 Commons Attribution&lt;/a&gt; licence.&lt;/p&gt;
     70 &lt;p&gt;This feels to me a bit like the difference between &lt;a href=&#34;https://opensource.org/licenses/BSD-3-Clause&#34;&gt;BSD&lt;/a&gt; and
     71 &lt;a href=&#34;https://opensource.org/licenses/GPL-3.0&#34;&gt;GPL&lt;/a&gt; terms, where the latter requires that derived works also be
     72 GPL-licensed. This &amp;ldquo;viral&amp;rdquo; nature has always rubbed me the wrong way: rather
     73 than gently promoting a culture of sharing by example, it legally &lt;em&gt;requires&lt;/em&gt;
     74 sharing under the same terms whether or not you want to.&lt;/p&gt;
     75 &lt;p&gt;Personally, I&amp;rsquo;d like for people to do the right thing and share their work for
     76 everyone&amp;rsquo;s benefit not because they &lt;em&gt;have&lt;/em&gt; to, but because they &lt;em&gt;want&lt;/em&gt; to. If
     77 they don&amp;rsquo;t want to, why should my reaction be to disallow their use of my work?
     78 Isn&amp;rsquo;t that contrary to my stated goals of sharing as much and as broadly as
     79 possible?&lt;/p&gt;
     80 &lt;p&gt;While I &lt;em&gt;hope&lt;/em&gt; that more people share more of their work, it doesn&amp;rsquo;t bother me
     81 if you don&amp;rsquo;t. If anything I&amp;rsquo;ve written is somehow useful to you, I&amp;rsquo;m glad. Use
     82 your knowledge to help others and make the world a better place, and if you can
     83 find time to do so, share a bit with the rest of us.&lt;/p&gt;
     84 &lt;p&gt;Got thoughts and opinions on licences? Fire an email my way at
     85 &lt;a href=&#34;mailto:chris@bracken.jp&#34;&gt;chris@bracken.jp&lt;/a&gt;.&lt;/p&gt;
     86 </description>
     87     </item>
     88     
     89     <item>
     90       <title>Hand-decoding an ELF binary image</title>
     91       <link>https://chris.bracken.jp/2018/10/decoding-an-elf-binary/</link>
     92       <pubDate>Wed, 31 Oct 2018 00:00:00 +0000</pubDate>
     93       
     94       <guid>https://chris.bracken.jp/2018/10/decoding-an-elf-binary/</guid>
     95       <description>&lt;p&gt;While recovering from some dentistry the other day I figured I&amp;rsquo;d have a go at
     96 better understanding the ELF binary format. What better way to do that than to
     97 compile a small program and hand-decode the resulting binary with a hex editor
     98 and whatever ELF format spec I could find.&lt;/p&gt;
     99 &lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;
    100 &lt;p&gt;Below, we&amp;rsquo;ll use &lt;code&gt;nasm&lt;/code&gt; to build a small assembly Hello World program to a
    101 64-bit ELF object file, then link that into an ELF executable with GNU &lt;code&gt;ld&lt;/code&gt;.
    102 Finally, we&amp;rsquo;ll run the resulting object file and binary image through &lt;code&gt;xxd&lt;/code&gt; and
    103 hand-decode the resulting hex.&lt;/p&gt;
    104 &lt;p&gt;The code and instructions below work on FreeBSD 11 on x86_64 hardware. For
    105 other operating systems, hardware, and toolchains, you&amp;rsquo;re on your own! I&amp;rsquo;d
    106 imagine this should all work just fine on Linux. If I get bored one day, I may
    107 redo this for Mach-O binaries on macOS.&lt;/p&gt;
    108 &lt;h2 id=&#34;helloasm&#34;&gt;hello.asm&lt;/h2&gt;
    109 &lt;p&gt;First we&amp;rsquo;ll bang up a minimal Hello World program in assembly. In the &lt;code&gt;.data&lt;/code&gt;
    110 section, we add a null-terminated string, &lt;code&gt;hello&lt;/code&gt;, and its length &lt;code&gt;hbytes&lt;/code&gt;. In
    111 the program text, we set up and execute the &lt;code&gt;write(stdout, hello, hbytes)&lt;/code&gt;
    112 syscall, then set up and execute an &lt;code&gt;exit(0)&lt;/code&gt; syscall.&lt;/p&gt;
    113 &lt;p&gt;Note that 64-bit FreeBSD, macOS, and Linux all use the SysV AMD64 calling
    114 convention. For calls against the kernel interface, the syscall number is
    115 stored in &lt;code&gt;rax&lt;/code&gt; and up to six parameters are passed, in order, in &lt;code&gt;rdi&lt;/code&gt;, &lt;code&gt;rsi&lt;/code&gt;,
    116 &lt;code&gt;rdx&lt;/code&gt;, &lt;code&gt;r10&lt;/code&gt;, &lt;code&gt;r8&lt;/code&gt;, &lt;code&gt;r9&lt;/code&gt;. For user calls, replace &lt;code&gt;r10&lt;/code&gt; with &lt;code&gt;rcx&lt;/code&gt; in this
    117 list, and pass further arguments on the stack. In all cases, the return value
    118 is passed through &lt;code&gt;rax&lt;/code&gt;.  More details can be found in section A.2.1 of the
    119 &lt;a href=&#34;https://software.intel.com/sites/default/files/article/402129/mpx-linux64-abi.pdf&#34;&gt;System V AMD64 ABI Reference&lt;/a&gt;.&lt;/p&gt;
    120 &lt;pre&gt;&lt;code&gt;; hello.asm
    121 
    122 %define stdin       0
    123 %define stdout      1
    124 %define stderr      2
    125 %define SYS_exit    1
    126 %define SYS_write   4
    127 
    128 %macro  system      1
    129         mov         rax, %1
    130         syscall
    131 %endmacro
    132 
    133 %macro  sys.exit    0
    134         system      SYS_exit
    135 %endmacro
    136 
    137 %macro  sys.write   0
    138         system      SYS_write
    139 %endmacro
    140 
    141 section  .data
    142     hello   db      &#39;Hello, World!&#39;, 0Ah
    143     hbytes  equ     $-hello
    144 
    145 section .text
    146 global  _start
    147 _start:
    148     mov         rdi, stdout
    149     mov         rsi, hello
    150     mov         rdx, hbytes
    151     sys.write
    152 
    153     xor         rdi,rdi
    154     sys.exit
    155 &lt;/code&gt;&lt;/pre&gt;
    156 &lt;h2 id=&#34;compile-to-object-code&#34;&gt;Compile to object code&lt;/h2&gt;
    157 &lt;p&gt;Next, we&amp;rsquo;ll compile &lt;code&gt;hello.asm&lt;/code&gt; to a 64-bit ELF object file using &lt;code&gt;nasm&lt;/code&gt;:&lt;/p&gt;
    158 &lt;pre&gt;&lt;code&gt;% nasm -f elf64 hello.asm
    159 &lt;/code&gt;&lt;/pre&gt;
    160 &lt;p&gt;This emits &lt;code&gt;hello.o&lt;/code&gt;, an 880-byte ELF-64 object file. Since we haven&amp;rsquo;t yet run
    161 this through the linker, addresses of global symbols (in this case, &lt;code&gt;hello&lt;/code&gt;)
    162 are not yet known and thus left with address 0x0 placeholders. We can see this
    163 in the &lt;code&gt;movabs&lt;/code&gt; instruction at offset 0x15 of the &lt;code&gt;.text&lt;/code&gt; section below.&lt;/p&gt;
    164 &lt;p&gt;The relocation section (Section 6: &lt;code&gt;.rela.text&lt;/code&gt;) contains an entry for each
    165 symbolic reference that needs to be filled in by the linker. In this case
    166 there&amp;rsquo;s just a single entry for the symbol &lt;code&gt;hello&lt;/code&gt; (which points to our hello
    167 world string). The relocation table entry&amp;rsquo;s &lt;code&gt;r_offset&lt;/code&gt; indicates the address to
    168 replace is at an offset of 0x7 into the section of the associated symbol table
    169 entry. Its &lt;code&gt;r_info&lt;/code&gt; (0x0000000200000001) encodes a relocation type in its lower
    170 4 bytes (0x1: &lt;code&gt;R_AMD64_64&lt;/code&gt;) and the associated symbol table entry in its upper
    171 4 bytes (0x2, which, if we look it up in the symbol table is the &lt;code&gt;.text&lt;/code&gt;
    172 section).  The &lt;code&gt;r_addend&lt;/code&gt; field (0x0) specifies an additional adjustment to the
    173 substituted symbol to be applied at link time; specifically, for the
    174 &lt;code&gt;R_AMD64_64&lt;/code&gt;, the final address is computed as S + A, where S is the
    175 substituted symbol value (in our case, the address of &lt;code&gt;hello&lt;/code&gt;) and A is the
    176 addend (in our case, 0x0).&lt;/p&gt;
    177 &lt;p&gt;Without further ado, let&amp;rsquo;s dump the object file:&lt;/p&gt;
    178 &lt;pre&gt;&lt;code&gt;% xxd hello.o
    179 &lt;/code&gt;&lt;/pre&gt;
    180 &lt;p&gt;With whatever ELF64 &lt;a href=&#34;https://docs.oracle.com/cd/E19120-01/open.solaris/819-0690/index.html&#34;&gt;linker &amp;amp; loader guide&lt;/a&gt; we can find at hand,
    181 let&amp;rsquo;s get decoding this thing:&lt;/p&gt;
    182 &lt;h3 id=&#34;elf-header&#34;&gt;ELF Header&lt;/h3&gt;
    183 &lt;pre&gt;&lt;code&gt;|00000000: 7f45 4c46 0201 0100 0000 0000 0000 0000|  .ELF............
    184 |00000010: 0100 3e00 0100 0000 0000 0000 0000 0000|  ..&amp;gt;.............
    185 |00000020: 0000 0000 0000 0000 4000 0000 0000 0000|  ........@.......
    186 |00000030: 0000 0000 4000 0000 0000 4000 0700 0300|  ....@.....@.....
    187 
    188 e_ident[EI_MAG0..EI_MAG3]  0x7f + ELF          Magic
    189 e_ident[EI_CLASS]          0x02                64-bit
    190 e_ident[EI_DATA]           0x01                Little-endian
    191 e_ident[EI_VERSION]        0x01                ELF v1
    192 e_ident[EI_OSABI]          0x00                System V
    193 e_ident[EI_ABIVERSION]     0x00                Unused
    194 e_ident[EI_PAD]            0x00000000000000    7 bytes unused padding
    195 e_type                     0x0001              ET_REL
    196 e_machine                  0x003e              x86_64
    197 e_version                  0x00000001          Version 1
    198 e_entry                    0x0000000000000000  Entrypoint address (none)
    199 e_phoff                    0x0000000000000000  Program header table offset in image
    200 e_shoff                    0x0000000000000040  Section header table offset in image
    201 e_flags                    0x00000000          Architecture-dependent interpretation
    202 e_ehsize                   0x0040              Size of this ELF header (64B)
    203 e_phentsize                0x0000              Size of program header table entry
    204 e_phnum                    0x0000              Number of program header table entries
    205 e_shentsize                0x0040              Size of section header table entry (64B)
    206 e_shnum                    0x0007              Number of section header table entries
    207 e_shstrndx                 0x0003              Index of section header for .shstrtab
    208 &lt;/code&gt;&lt;/pre&gt;
    209 &lt;h3 id=&#34;section-header-table-entry-0-null&#34;&gt;Section header table: Entry 0 (null)&lt;/h3&gt;
    210 &lt;pre&gt;&lt;code&gt;|00000040: 0000 0000 0000 0000 0000 0000 0000 0000|  ................
    211 |00000050: 0000 0000 0000 0000 0000 0000 0000 0000|  ................
    212 |00000060: 0000 0000 0000 0000 0000 0000 0000 0000|  ................
    213 |00000070: 0000 0000 0000 0000 0000 0000 0000 0000|  ................
    214 
    215 sh_name                    0x00000000          Offset into .shstrtab
    216 sh_type                    0x00000000          SHT_NULL
    217 sh_flags                   0x0000000000000000  Section attributes
    218 sh_addr                    0x0000000000000000  Virtual address of section in memory
    219 sh_offset                  0x0000000000000000  Offset of section in file image
    220 sh_size                    0x0000000000000000  Size in bytes of section in file image
    221 sh_link                    0x00000000          Section index of associated section
    222 sh_info                    0x00000000          Extra info about section
    223 sh_addralign               0x0000000000000000  Alignment
    224 sh_entsize                 0x0000000000000000  Size in bytes of each entry
    225 &lt;/code&gt;&lt;/pre&gt;
    226 &lt;h3 id=&#34;section-header-table-entry-1-data&#34;&gt;Section header table: Entry 1 (.data)&lt;/h3&gt;
    227 &lt;pre&gt;&lt;code&gt;|00000080: 0100 0000 0100 0000 0300 0000 0000 0000|  ................
    228 |00000090: 0000 0000 0000 0000 0002 0000 0000 0000|  ................
    229 |000000a0: 0e00 0000 0000 0000 0000 0000 0000 0000|  ................
    230 |000000b0: 0400 0000 0000 0000 0000 0000 0000 0000|  ................
    231 
    232 sh_name                    0x00000001          Offset into .shstrtab
    233 sh_type                    0x00000001          SHT_PROGBITS
    234 sh_flags                   0x0000000000000003  SHF_WRITE | SHF_ALLOC
    235 sh_addr                    0x0000000000000000  Virtual address of section in memory
    236 sh_offset                  0x0000000000000200  Offset of section in file image
    237 sh_size                    0x000000000000000e  Size in bytes of section in file image
    238 sh_link                    0x00000000          Section index of associated section
    239 sh_info                    0x00000000          Extra info about section
    240 sh_addralign               0x0000000000000004  Alignment
    241 sh_entsize                 0x0000000000000000  Size in bytes of each entry
    242 &lt;/code&gt;&lt;/pre&gt;
    243 &lt;h3 id=&#34;section-header-table-entry-2-text&#34;&gt;Section header table: Entry 2 (.text)&lt;/h3&gt;
    244 &lt;pre&gt;&lt;code&gt;|000000c0: 0700 0000 0100 0000 0600 0000 0000 0000|  ................
    245 |000000d0: 0000 0000 0000 0000 1002 0000 0000 0000|  ................
    246 |000000e0: 2500 0000 0000 0000 0000 0000 0000 0000|  %...............
    247 |000000f0: 1000 0000 0000 0000 0000 0000 0000 0000|  ................
    248 
    249 sh_name                    0x00000007          Offset into .shstrtab
    250 sh_type                    0x00000001          SHT_PROGBITS
    251 sh_flags                   0x0000000000000006  SHF_ALLOC | SHF_EXECINSTR
    252 sh_addr                    0x0000000000000000  Virtual address of section in memory
    253 sh_offset                  0x0000000000000210  Offset of section in file image
    254 sh_size                    0x0000000000000025  Size in bytes of section in file image
    255 sh_link                    0x00000000          Section index of associated section
    256 sh_info                    0x00000000          Extra info about section
    257 sh_addralign               0x0000000000000001  Alignment
    258 sh_entsize                 0x0000000000000000  Size in bytes of each entry
    259 &lt;/code&gt;&lt;/pre&gt;
    260 &lt;h3 id=&#34;section-header-table-entry-3-shstrtab&#34;&gt;Section header table: Entry 3 (.shstrtab)&lt;/h3&gt;
    261 &lt;pre&gt;&lt;code&gt;|00000100: 0d00 0000 0300 0000 0000 0000 0000 0000|  ................
    262 |00000110: 0000 0000 0000 0000 4002 0000 0000 0000|  ........@.......
    263 |00000120: 3200 0000 0000 0000 0000 0000 0000 0000|  2...............
    264 |00000130: 0100 0000 0000 0000 0000 0000 0000 0000|  ................
    265 
    266 sh_name                    0x0000000d          Offset into .shstrtab
    267 sh_type                    0x00000003          SHT_STRTAB
    268 sh_flags                   0x0000000000000000  Section attributes
    269 sh_addr                    0x0000000000000000  Virtual address of section in memory
    270 sh_offset                  0x0000000000000240  Offset of section in file image
    271 sh_size                    0x0000000000000032  Size in bytes of section in file image
    272 sh_link                    0x00000000          Section index of associated section
    273 sh_info                    0x00000000          Extra info about section
    274 sh_addralign               0x0000000000000001  Alignment
    275 sh_entsize                 0x0000000000000000  Size in bytes of each entry
    276 &lt;/code&gt;&lt;/pre&gt;
    277 &lt;h3 id=&#34;section-header-table-entry-4-symtab&#34;&gt;Section header table: Entry 4 (.symtab)&lt;/h3&gt;
    278 &lt;pre&gt;&lt;code&gt;|00000140: 1700 0000 0200 0000 0000 0000 0000 0000|  ................
    279 |00000150: 0000 0000 0000 0000 8002 0000 0000 0000|  ................
    280 |00000160: a800 0000 0000 0000 0500 0000 0600 0000|  ................
    281 |00000170: 0800 0000 0000 0000 1800 0000 0000 0000|  ................
    282 
    283 sh_name                    0x00000017          Offset into .shstrtab
    284 sh_type                    0x00000002          SHT_SYMTAB
    285 sh_flags                   0x0000000000000000  Section attributes
    286 sh_addr                    0x0000000000000000  Virtual address of section in memory
    287 sh_offset                  0x0000000000000280  Offset of section in file image
    288 sh_size                    0x00000000000000a8  Size in bytes of section in file image
    289 sh_link                    0x00000005          Section index of associated section
    290 sh_info                    0x00000006          Extra info about section
    291 sh_addralign               0x0000000000000008  Alignment
    292 sh_entsize                 0x0000000000000018  Size in bytes of each entry
    293 &lt;/code&gt;&lt;/pre&gt;
    294 &lt;h3 id=&#34;section-header-table-entry-5-strtab&#34;&gt;Section header table: Entry 5 (.strtab)&lt;/h3&gt;
    295 &lt;pre&gt;&lt;code&gt;|00000180: 1f00 0000 0300 0000 0000 0000 0000 0000|  ................
    296 |00000190: 0000 0000 0000 0000 3003 0000 0000 0000|  ........0.......
    297 |000001a0: 1f00 0000 0000 0000 0000 0000 0000 0000|  ................
    298 |000001b0: 0100 0000 0000 0000 0000 0000 0000 0000|  ................
    299 
    300 sh_name                    0x0000001f          Offset into .shstrtab
    301 sh_type                    0x00000003          SHT_STRTAB
    302 sh_flags                   0x0000000000000000  Section attributes
    303 sh_addr                    0x0000000000000000  Virtual address of section in memory
    304 sh_offset                  0x0000000000000330  Offset of section in file image
    305 sh_size                    0x000000000000001f  Size in bytes of section in file image
    306 sh_link                    0x00000000          Section index of associated section
    307 sh_info                    0x00000000          Extra info about section
    308 sh_addralign               0x0000000000000001  Alignment
    309 sh_entsize                 0x0000000000000000  Size in bytes of each entry
    310 &lt;/code&gt;&lt;/pre&gt;
    311 &lt;h3 id=&#34;section-header-table-entry-6-relatext&#34;&gt;Section header table: Entry 6 (.rela.text)&lt;/h3&gt;
    312 &lt;pre&gt;&lt;code&gt;|000001c0: 2700 0000 0400 0000 0000 0000 0000 0000|  &#39;...............
    313 |000001d0: 0000 0000 0000 0000 5003 0000 0000 0000|  ........P.......
    314 |000001e0: 1800 0000 0000 0000 0400 0000 0200 0000|  ................
    315 |000001f0: 0800 0000 0000 0000 1800 0000 0000 0000|  ................
    316 
    317 sh_name                    0x00000027          Offset into .shstrtab
    318 sh_type                    0x00000004          SHT_RELA
    319 sh_flags                   0x0000000000000000  Section attributes
    320 sh_addr                    0x0000000000000000  Virtual address of section in memory
    321 sh_offset                  0x0000000000000350  Offset of section in file image
    322 sh_size                    0x0000000000000018  Size in bytes of section in file image
    323 sh_link                    0x00000004          Section index of associated section
    324 sh_info                    0x00000002          Extra info about section
    325 sh_addralign               0x0000000000000008  Alignment
    326 sh_entsize                 0x0000000000000018  Size in bytes of each entry
    327 &lt;/code&gt;&lt;/pre&gt;
    328 &lt;h3 id=&#34;section-1-data-sht_progbits-shf_write--shf_alloc&#34;&gt;Section 1: .data (SHT_PROGBITS; SHF_WRITE | SHF_ALLOC)&lt;/h3&gt;
    329 &lt;pre&gt;&lt;code&gt;|00000200: 4865 6c6c 6f2c 2057 6f72 6c64 210a 0000|  Hello, World!...
    330 
    331 0x000000  &#39;Hello, World!\n&#39;
    332 Zero-padding (2 bytes starting at 0x20e)
    333 &lt;/code&gt;&lt;/pre&gt;
    334 &lt;h3 id=&#34;section-2-text-sht_progbits-shf_alloc--shf_execinstr&#34;&gt;Section 2: .text (SHT_PROGBITS; SHF_ALLOC | SHF_EXECINSTR)&lt;/h3&gt;
    335 &lt;pre&gt;&lt;code&gt;|00000210: bf01 0000 0048 be00 0000 0000 0000 00ba|  .....H..........
    336 |00000220: 0e00 0000 b804 0000 000f 0548 31ff b801|  ...........H1...
    337 |00000230: 0000 000f 0500 0000 0000 0000 0000 0000|  ................
    338 
    339 0x00000010  mov       edi, 0x1
    340 0x00000015  movabs    rsi, 0x000000 (placeholder for db hello)
    341 0x0000001f  mov       edx, 0xe
    342 0x00000024  mov       eax, 0x4
    343 0x00400029  syscall
    344 0x0040002b  xor       rdi, rdi
    345 0x0040002e  mov       eax, 0x1
    346 0x00400033  syscall
    347 Zero-padding (11 bytes starting at 0x235)
    348 &lt;/code&gt;&lt;/pre&gt;
    349 &lt;h3 id=&#34;section-3-shstrtab-sht_strtab&#34;&gt;Section 3: .shstrtab (SHT_STRTAB;)&lt;/h3&gt;
    350 &lt;pre&gt;&lt;code&gt;|00000240: 002e 6461 7461 002e 7465 7874 002e 7368|  ..data..text..sh
    351 |00000250: 7374 7274 6162 002e 7379 6d74 6162 002e|  strtab..symtab..
    352 |00000260: 7374 7274 6162 002e 7265 6c61 2e74 6578|  strtab..rela.tex
    353 |00000270: 7400 0000 0000 0000 0000 0000 0000 0000|  t...............
    354 
    355 0x00000000: &#39;&#39;
    356 0x00000001: &#39;.data&#39;
    357 0x00000007: &#39;.text&#39;
    358 0x0000000d: &#39;.shstrtab&#39;
    359 0x00000017: &#39;.symtab&#39;
    360 0x0000001f: &#39;.strtab&#39;
    361 0x00000027: &#39;.rela.text&#39;
    362 Zero-padding (14 bytes starting at 0x272)
    363 &lt;/code&gt;&lt;/pre&gt;
    364 &lt;h3 id=&#34;section-4-symtab-sht_symtab&#34;&gt;Section 4: .symtab&amp;rsquo; (SHT_SYMTAB;)&lt;/h3&gt;
    365 &lt;h4 id=&#34;symbol-table-entry-0&#34;&gt;Symbol table entry 0&lt;/h4&gt;
    366 &lt;pre&gt;&lt;code&gt;|00000280: 0000 0000 0000 0000 0000 0000 0000 0000|  ................
    367 |00000290: 0000 0000 0000 0000                    |  ........
    368 
    369 st_name                    0x00000000
    370 st_info                    0x00
    371 st_other                   0x00
    372 st_shndx                   0x0000 (SHN_UNDEF)
    373 st_value                   0x0000000000000000
    374 st_size                    0x0000000000000000
    375 &lt;/code&gt;&lt;/pre&gt;
    376 &lt;h4 id=&#34;symbol-table-entry-1-helloasm&#34;&gt;Symbol table entry 1 (hello.asm)&lt;/h4&gt;
    377 &lt;pre&gt;&lt;code&gt;|00000298:                     0100 0000 0400 f1ff|          ........
    378 |000002a0: 0000 0000 0000 0000 0000 0000 0000 0000|  ................
    379 
    380 st_name                    0x00000001
    381 st_info                    0x04 (STT_FILE)
    382 st_other                   0x00
    383 st_shndx                   0xfff1 (SHN_ABS)
    384 st_value                   0x0000000000000000
    385 st_size                    0x0000000000000000
    386 &lt;/code&gt;&lt;/pre&gt;
    387 &lt;h4 id=&#34;symbol-table-entry-2&#34;&gt;Symbol table entry 2&lt;/h4&gt;
    388 &lt;pre&gt;&lt;code&gt;|000002b0: 0000 0000 0300 0100 0000 0000 0000 0000|  ................
    389 |000002c0: 0000 0000 0000 0000                    |  ........
    390 
    391 st_name                    0x00000000
    392 st_info                    0x03 (STT_OBJECT | STT_FUNC)
    393 st_other                   0x00
    394 st_shndx                   0x0001 (Section 1: .data)
    395 st_value                   0x0000000000000000
    396 st_size                    0x0000000000000000
    397 &lt;/code&gt;&lt;/pre&gt;
    398 &lt;h4 id=&#34;symbol-table-entry-3&#34;&gt;Symbol table entry 3&lt;/h4&gt;
    399 &lt;pre&gt;&lt;code&gt;|000002c8:                     0000 0000 0300 0200|          ........
    400 |000002d0: 0000 0000 0000 0000 0000 0000 0000 0000|  ................
    401 
    402 st_name                    0x00000000
    403 st_info                    0x03 (STT_OBJECT | STT_FUNC)
    404 st_other                   0x00
    405 st_shndx                   0x0002 (Section 2: .text)
    406 st_value                   0x0000000000000000
    407 st_size                    0x0000000000000000
    408 &lt;/code&gt;&lt;/pre&gt;
    409 &lt;h4 id=&#34;symbol-table-entry-4-hello&#34;&gt;Symbol table entry 4 (hello)&lt;/h4&gt;
    410 &lt;pre&gt;&lt;code&gt;|000002e0: 0b00 0000 0000 0100 0000 0000 0000 0000|  ................
    411 |000002f0: 0000 0000 0000 0000                    |  ........
    412 
    413 st_name                    0x0000000b
    414 st_info                    0x00
    415 st_other                   0x00
    416 st_shndx                   0x0001 (Section 1: .data)
    417 st_value                   0x0000000000000000
    418 st_size                    0x0000000000000000
    419 &lt;/code&gt;&lt;/pre&gt;
    420 &lt;h3 id=&#34;symbol-table-entry-5-hbytes&#34;&gt;Symbol table entry 5 (hbytes)&lt;/h3&gt;
    421 &lt;pre&gt;&lt;code&gt;|000002f8:                     1100 0000 0000 f1ff|          ........
    422 |00000300: 0e00 0000 0000 0000 0000 0000 0000 0000|  ................
    423 
    424 st_name                    0x00000011
    425 st_info                    0x00
    426 st_other                   0x00
    427 st_shndx                   0xfff1 (SHN_ABS)
    428 st_value                   0x000000000000000e
    429 st_size                    0x0000000000000000
    430 &lt;/code&gt;&lt;/pre&gt;
    431 &lt;h4 id=&#34;symbol-table-entry-6-_start&#34;&gt;Symbol table entry 6 (_start)&lt;/h4&gt;
    432 &lt;pre&gt;&lt;code&gt;|00000310: 1800 0000 1000 0200 0000 0000 0000 0000|  ................
    433 |00000320: 0000 0000 0000 0000 0000 0000 0000 0000|  ................
    434 
    435 st_name                    0x00000018
    436 st_info                    0x01 (STT_OBJECT)
    437 st_other                   0x00
    438 st_shndx                   0x0002 (Section 2: .text)
    439 st_value                   0x0000000000000000
    440 st_size                    0x0000000000000000
    441 Zero-padding (8 bytes starting at 0x328)
    442 &lt;/code&gt;&lt;/pre&gt;
    443 &lt;h3 id=&#34;section-5-strtab-sht_strtab&#34;&gt;Section 5: .strtab (SHT_STRTAB;)&lt;/h3&gt;
    444 &lt;pre&gt;&lt;code&gt;|00000330: 0068 656c 6c6f 2e61 736d 0068 656c 6c6f|  .hello.asm.hello
    445 |00000340: 0068 6279 7465 7300 5f73 7461 7274 0000|  .hbytes._start..
    446 
    447 0x00000000: &#39;&#39;
    448 0x00000001: &#39;hello.asm&#39;
    449 0x0000000b: &#39;hello&#39;
    450 0x00000011: &#39;hbytes&#39;
    451 0x00000018: &#39;_start&#39;
    452 Zero-padding (1 byte starting at 0x34f)
    453 &lt;/code&gt;&lt;/pre&gt;
    454 &lt;h3 id=&#34;section-6-relatext-sht_rela&#34;&gt;Section 6: .rela.text (SHT_RELA;)&lt;/h3&gt;
    455 &lt;pre&gt;&lt;code&gt;|00000350: 0700 0000 0000 0000 0100 0000 0200 0000|  ................
    456 |00000360: 0000 0000 0000 0000 0000 0000 0000 0000|  ................
    457 
    458 r_offset                   0x0000000000000007
    459 r_info                     0x0000000200000001 (Symbol table entry 2, type R_AMD64_64)
    460 r_addend                   0x0000000000000000
    461 Zero-padding (8 bytes starting at 0x368)
    462 &lt;/code&gt;&lt;/pre&gt;
    463 &lt;h2 id=&#34;link-to-executable-image&#34;&gt;Link to executable image&lt;/h2&gt;
    464 &lt;p&gt;Next, let&amp;rsquo;s link &lt;code&gt;hello.o&lt;/code&gt; into a 64-bit ELF executable:&lt;/p&gt;
    465 &lt;pre&gt;&lt;code&gt;% ld -o hello hello.o
    466 &lt;/code&gt;&lt;/pre&gt;
    467 &lt;p&gt;This emits &lt;code&gt;hello&lt;/code&gt;, a 951-byte ELF-64 executable image.&lt;/p&gt;
    468 &lt;p&gt;Since the linker has decided which segment each section maps into (if any) and
    469 what the segment addresses are, addresses are now known for all (statically
    470 linked) symbols, and address 0x0 placeholders have been replaced with actual
    471 addresses. We can see this in the &lt;code&gt;mov&lt;/code&gt; instruction at address 0x4000b5, which
    472 now specifies an address of 0x6000d8.&lt;/p&gt;
    473 &lt;p&gt;Running the linked executable image through &lt;code&gt;xxd&lt;/code&gt; as above and picking our
    474 trusty linker &amp;amp; loader guide back up, here we go again:&lt;/p&gt;
    475 &lt;h3 id=&#34;elf-header-1&#34;&gt;ELF Header&lt;/h3&gt;
    476 &lt;pre&gt;&lt;code&gt;|00000000: 7f45 4c46 0201 0109 0000 0000 0000 0000|  .ELF............
    477 |00000010: 0200 3e00 0100 0000 b000 4000 0000 0000|  ..&amp;gt;.......@.....
    478 |00000020: 4000 0000 0000 0000 1001 0000 0000 0000|  @...............
    479 |00000030: 0000 0000 4000 3800 0200 4000 0600 0300|  ....@.8...@.....
    480 
    481 e_ident[EI_MAG0..EI_MAG3]  0x7f + ELF          Magic
    482 e_ident[EI_CLASS]          0x02                64-bit
    483 e_ident[EI_DATA]           0x01                Little-endian
    484 e_ident[EI_VERSION]        0x01                ELF v1
    485 e_ident[EI_OSABI]          0x09                FreeBSD
    486 e_ident[EI_ABIVERSION]     0x00                Unused
    487 e_ident[EI_PAD]            0x0000000000        7 bytes unused padding
    488 e_type                     0x0002              ET_EXEC
    489 e_machine                  0x003e              x86_64
    490 e_version                  0x00000001          Version 1
    491 e_entry                    0x00000000004000b0  Entrypoint addr
    492 e_phoff                    0x0000000000000040  Program header table offset in image
    493 e_shoff                    0x0000000000000110  Section header table offset in image
    494 e_flags                    0x00000000          Architecture-dependent interpretation
    495 e_ehsize                   0x0040              Size of this ELF header
    496 e_phentsize                0x0038              Size of program header table entry
    497 e_phnum                    0x0002              Number of program header table entries
    498 e_shentsize                0x0040              Size of section header table entry
    499 e_shnum                    0x0006              Number of section header table entries
    500 e_shstrndx                 0x0003              Index of section header for .shstrtab
    501 &lt;/code&gt;&lt;/pre&gt;
    502 &lt;h3 id=&#34;program-header-table-entry-0-pf_x--pf_r&#34;&gt;Program header table: Entry 0 (PF_X | PF_R)&lt;/h3&gt;
    503 &lt;pre&gt;&lt;code&gt;|00000040: 0100 0000 0500 0000 0000 0000 0000 0000|  ................
    504 |00000050: 0000 4000 0000 0000 0000 4000 0000 0000|  ..@.......@.....
    505 |00000060: d500 0000 0000 0000 d500 0000 0000 0000|  ................
    506 |00000070: 0000 2000 0000 0000                    |  .. .............
    507 
    508 p_type                     0x00000001          PT_LOAD
    509 p_flags                    0x00000005          PF_X | PF_R
    510 p_offset                   0x00000000          Offset of segment in file image
    511 p_vaddr                    0x0000000000400000  Virtual address of segment in memory
    512 p_paddr                    0x0000000000400000  Physical address of segment
    513 p_filesz                   0x00000000000000d5  Size in bytes of segment in file image
    514 p_memsz                    0x00000000000000d5  Size in bytes of segment in memory
    515 p_align                    0x0000000000200000  Alignment (2MB)
    516 &lt;/code&gt;&lt;/pre&gt;
    517 &lt;h3 id=&#34;program-header-table-entry-1-pf_w--pf_r&#34;&gt;Program header table: Entry 1 (PF_W | PF_R)&lt;/h3&gt;
    518 &lt;pre&gt;&lt;code&gt;|00000078:                     0100 0000 0600 0000|          ........
    519 |00000080: d800 0000 0000 0000 d800 6000 0000 0000|  ..........`.....
    520 |00000090: d800 6000 0000 0000 0e00 0000 0000 0000|  ..`.............
    521 |000000a0: 0e00 0000 0000 0000 0000 2000 0000 0000|  .......... .....
    522 
    523 p_type                     0x00000001          PT_LOAD
    524 p_flags                    0x00000006          PF_W | PF_R
    525 p_offset                   0x00000000000000d8  Offset of segment in file image
    526 p_vaddr                    0x00000000006000d8  Virtual address of segment in memory
    527 p_paddr                    0x00000000006000d8  Physical address of segment
    528 p_filesz                   0x000000000000000e  Size in bytes of segment in file image
    529 p_memsz                    0x000000000000000e  Size in bytes of segment in memory
    530 p_align                    0x0000000000200000  Alignment (2MB)
    531 &lt;/code&gt;&lt;/pre&gt;
    532 &lt;h3 id=&#34;section-1-text-sht_progbits-shf_alloc--shf_execinstr&#34;&gt;Section 1: .text (SHT_PROGBITS; SHF_ALLOC | SHF_EXECINSTR)&lt;/h3&gt;
    533 &lt;pre&gt;&lt;code&gt;|000000b0: bf01 0000 0048 bed8 0060 0000 0000 00ba|  .....H...`......
    534 |000000c0: 0e00 0000 b804 0000 000f 0548 31ff b801|  ...........H1...
    535 |000000d0: 0000 000f 05                           |  .....
    536 
    537 0x4000b0  mov       edi, 0x1
    538 0x4000b5  movabs    rsi, 0x6000d8
    539 0x4000bf  mov       edx, 0xe
    540 0x4000c4  mov       eax, 0x4
    541 0x4000c9  syscall
    542 0x4000cb  xor       rdi, rdi
    543 0x4000ce  mov       eax, 0x1
    544 0x4000d3  syscall
    545 Zero-padding (5 bytes starting at 0x000000d5)
    546 &lt;/code&gt;&lt;/pre&gt;
    547 &lt;h3 id=&#34;section-2-data-sht_progbits-shf_write--shf_alloc&#34;&gt;Section 2: .data (SHT_PROGBITS; SHF_WRITE | SHF_ALLOC)&lt;/h3&gt;
    548 &lt;pre&gt;&lt;code&gt;|000000d8:                     4865 6c6c 6f2c 2057|          Hello, W
    549 |000000e0: 6f72 6c64 210a                         |  orld!.
    550 
    551 0x6000d8  &#39;Hello, World!\n&#39;
    552 &lt;/code&gt;&lt;/pre&gt;
    553 &lt;h3 id=&#34;section-3-shstrtab-sht_strtab-1&#34;&gt;Section 3: .shstrtab (SHT_STRTAB;)&lt;/h3&gt;
    554 &lt;pre&gt;&lt;code&gt;|000000e6:                002e 7379 6d74 6162 002e|        ..symtab..
    555 |000000f0: 7374 7274 6162 002e 7368 7374 7274 6162|  strtab..shstrtab
    556 |00000100: 002e 7465 7874 002e 6461 7461 0000 0000|  ..text..data.
    557 
    558 0x00000000: &#39;&#39;
    559 0x00000001: &#39;.symtab&#39;
    560 0x00000009: &#39;.strtab&#39;
    561 0x00000011: &#39;.shstrtab&#39;
    562 0x0000001b: &#39;.text&#39;
    563 0x00000021: &#39;.data&#39;
    564 Zero-padding (3 bytes starting at 0x0000010d)
    565 &lt;/code&gt;&lt;/pre&gt;
    566 &lt;h3 id=&#34;section-header-table-entry-0-null-1&#34;&gt;Section header table: Entry 0 (null)&lt;/h3&gt;
    567 &lt;pre&gt;&lt;code&gt;|00000110: 0000 0000 0000 0000 0000 0000 0000 0000|  ................
    568 |00000120: 0000 0000 0000 0000 0000 0000 0000 0000|  ................
    569 |00000130: 0000 0000 0000 0000 0000 0000 0000 0000|  ................
    570 |00000140: 0000 0000 0000 0000 0000 0000 0000 0000|  ................
    571 
    572 sh_name                    0x00000000          Offset into .shstrtab
    573 sh_type                    0x00000000          SHT_NULL
    574 sh_flags                   0x0000000000000000  Section attributes
    575 sh_addr                    0x0000000000000000  Virtual address of section in memory
    576 sh_offset                  0x0000000000000000  Offset of section in file image
    577 sh_size                    0x0000000000000000  Size in bytes of section in file image
    578 sh_link                    0x00000000          Section index of associated section
    579 sh_info                    0x00000000          Extra info about section
    580 sh_addralign               0x0000000000000000  Alignment
    581 sh_entsize                 0x0000000000000000  Size in bytes of each entry
    582 &lt;/code&gt;&lt;/pre&gt;
    583 &lt;h3 id=&#34;section-header-table-entry-1-text&#34;&gt;Section header table: Entry 1 (.text)&lt;/h3&gt;
    584 &lt;pre&gt;&lt;code&gt;|00000150: 1b00 0000 0100 0000 0600 0000 0000 0000|  ................
    585 |00000160: b000 4000 0000 0000 b000 0000 0000 0000|  ..@.............
    586 |00000170: 2500 0000 0000 0000 0000 0000 0000 0000|  %...............
    587 |00000180: 1000 0000 0000 0000 0000 0000 0000 0000|  ................
    588 
    589 sh_name                    0x0000001b          Offset into .shstrtab
    590 sh_type                    0x00000001          SHT_PROGBITS
    591 sh_flags                   0x00000006          SHF_ALLOC | SHF_EXECINSTR
    592 sh_addr                    0x00000000004000b0  Virtual address of section in memory
    593 sh_offset                  0x00000000000000b0  Offset of section in file image
    594 sh_size                    0x0000000000000025  Size in bytes of section in file image
    595 sh_link                    0x00000000          Section index of associated section
    596 sh_info                    0x00000000          Extra info about section
    597 sh_addralign               0x0000000000000010  Alignment (2B)
    598 sh_entsize                 0x0000000000000000  Size in bytes of each entry
    599 &lt;/code&gt;&lt;/pre&gt;
    600 &lt;h3 id=&#34;section-header-table-entry-2-data&#34;&gt;Section header table: Entry 2 (.data)&lt;/h3&gt;
    601 &lt;pre&gt;&lt;code&gt;|00000190: 2100 0000 0100 0000 0300 0000 0000 0000|  !...............
    602 |000001a0: d800 6000 0000 0000 d800 0000 0000 0000|  ..`.............
    603 |000001b0: 0e00 0000 0000 0000 0000 0000 0000 0000|  ................
    604 |000001c0: 0400 0000 0000 0000 0000 0000 0000 0000|  ................
    605 
    606 sh_name                    0x00000021          Offset into .shstrtab
    607 sh_type                    0x00000001          SHT_PROGBITS
    608 sh_flags                   0x0000000000000003  SHF_WRITE | SHF_ALLOC
    609 sh_addr                    0x00000000006000d8  Virtual address of section in memory
    610 sh_offset                  0x00000000000000d8  Offset of section in file image
    611 sh_size                    0x000000000000000e  Size in bytes of section in file image
    612 sh_link                    0x00000000          Section index of associated section
    613 sh_info                    0x00000000          Extra info about section
    614 sh_addralign               0x0000000000000004  Alignment (4B)
    615 sh_entsize                 0x0000000000000000  Size in bytes of each entry
    616 &lt;/code&gt;&lt;/pre&gt;
    617 &lt;h3 id=&#34;section-header-table-entry-3-shstrtab-1&#34;&gt;Section header table: Entry 3 (.shstrtab)&lt;/h3&gt;
    618 &lt;pre&gt;&lt;code&gt;|000001d0: 1100 0000 0300 0000 0000 0000 0000 0000|  ................
    619 |000001e0: 0000 0000 0000 0000 e600 0000 0000 0000|  ................
    620 |000001f0: 2700 0000 0000 0000 0000 0000 0000 0000|  &#39;...............
    621 |00000200: 0100 0000 0000 0000 0000 0000 0000 0000|  ................
    622 
    623 sh_name                    0x00000011          Offset into .shstrtab
    624 sh_type                    0x00000003          SHT_STRTAB
    625 sh_flags                   0x00000000          No flags
    626 sh_addr                    0x0000000000000000  Virtual address of section in memory
    627 sh_offset                  0x00000000000000e6  Offset of section in file image
    628 sh_size                    0x0000000000000027  Size in bytes of section in file image
    629 sh_link                    0x00000000          Section index of associated section
    630 sh_info                    0x00000000          Extra info about section
    631 sh_addralign               0x0000000000000001  Alignment (1B)
    632 sh_entsize                 0x0000000000000000  Size in bytes of each entry
    633 &lt;/code&gt;&lt;/pre&gt;
    634 &lt;h3 id=&#34;section-header-table-entry-4-symtab-1&#34;&gt;Section header table: Entry 4 (.symtab)&lt;/h3&gt;
    635 &lt;pre&gt;&lt;code&gt;|00000210: 0100 0000 0200 0000 0000 0000 0000 0000|  ................
    636 |00000220: 0000 0000 0000 0000 9002 0000 0000 0000|  ................
    637 |00000230: f000 0000 0000 0000 0500 0000 0600 0000|  ................
    638 |00000240: 0800 0000 0000 0000 1800 0000 0000 0000|  ................
    639 
    640 sh_name                    0x00000001          Offset into .shstrtab
    641 sh_type                    0x00000002          SHT_SYMTAB
    642 sh_flags                   0x00000000          No flags
    643 sh_addr                    0x0000000000000000  Virtual address of section in memory
    644 sh_offset                  0x0000000000000290  Offset of section in file image
    645 sh_size                    0x00000000000000f0  Size in bytes of section in file image
    646 sh_link                    0x00000005          Section index of associated section
    647 sh_info                    0x00000006          Flags
    648 sh_addralign               0x0000000000000008  Alignment (8B)
    649 sh_entsize                 0x0000000000000018  Size in bytes of each entry (24B)
    650 &lt;/code&gt;&lt;/pre&gt;
    651 &lt;h3 id=&#34;section-header-table-entry-5-strtab-1&#34;&gt;Section header table: Entry 5 (.strtab)&lt;/h3&gt;
    652 &lt;pre&gt;&lt;code&gt;|00000250: 0900 0000 0300 0000 0000 0000 0000 0000|  ................
    653 |00000260: 0000 0000 0000 0000 8003 0000 0000 0000|  ................
    654 |00000270: 3700 0000 0000 0000 0000 0000 0000 0000|  7...............
    655 |00000280: 0100 0000 0000 0000 0000 0000 0000 0000|  ................
    656 
    657 sh_name                    0x00000009          Offset into .shstrtab
    658 sh_type                    0x00000003          SHT_STRTAB
    659 sh_flags                   0x0000000000000000  No flags
    660 sh_addr                    0x0000000000000000  Virtual address of section in memory
    661 sh_offset                  0x0000000000000380  Offset of section in file image
    662 sh_size                    0x0000000000000037  Size in bytes of section in file image
    663 sh_link                    0x00000000          Section index of associated section
    664 sh_info                    0x00000000          Extrac info about section
    665 sh_addralign               0x0000000000000001  Alignment (1B)
    666 sh_entsize                 0x0000000000000000  Size in bytes of each entry
    667 &lt;/code&gt;&lt;/pre&gt;
    668 &lt;h3 id=&#34;section-4-symtab-sht_symtab-1&#34;&gt;Section 4: .symtab (SHT_SYMTAB;)&lt;/h3&gt;
    669 &lt;h4 id=&#34;symbol-table-entry-0-1&#34;&gt;Symbol table entry 0&lt;/h4&gt;
    670 &lt;pre&gt;&lt;code&gt;|00000290: 0000 0000 0000 0000 0000 0000 0000 0000|  ................
    671 |000002a0: 0000 0000 0000 0000                    |  ........
    672 
    673 st_name                    0x00000000
    674 st_info                    0x00
    675 st_other                   0x00
    676 st_shndx                   0x0000 (SHN_UNDEF)
    677 st_value                   0x0000000000000000
    678 st_size                    0x0000000000000000
    679 &lt;/code&gt;&lt;/pre&gt;
    680 &lt;h4 id=&#34;symbol-table-entry-1&#34;&gt;Symbol table entry 1&lt;/h4&gt;
    681 &lt;pre&gt;&lt;code&gt;|000002a8:                     0000 0000 0300 0100|          ........
    682 |000002b0: b000 4000 0000 0000 0000 0000 0000 0000|  ..@.............
    683 
    684 st_name                    0x00000000
    685 st_info                    0x03 (STT_OBJECT | STT_FUNC)
    686 st_other                   0x00
    687 st_shndx                   0x0001 (Section 1: .text)
    688 st_value                   0x00000000004000b0
    689 st_size                    0x0000000000000000
    690 &lt;/code&gt;&lt;/pre&gt;
    691 &lt;h4 id=&#34;symbol-table-entry-2-1&#34;&gt;Symbol table entry 2&lt;/h4&gt;
    692 &lt;pre&gt;&lt;code&gt;|000002c0: 0000 0000 0300 0200 d800 6000 0000 0000|  ..........`.....
    693 |000002d0: 0000 0000 0000 0000                    |  ........
    694 
    695 st_name                    0x00000000
    696 st_info                    0x03 (STT_OBJECT | STT_FUNC)
    697 st_other                   0x00
    698 st_shndx                   0x0002 (Section 2: .data)
    699 st_value                   0x00000000006000d8
    700 st_size                    0x0000000000000000
    701 &lt;/code&gt;&lt;/pre&gt;
    702 &lt;h4 id=&#34;symbol-table-entry-3-helloasm&#34;&gt;Symbol table entry 3 (hello.asm)&lt;/h4&gt;
    703 &lt;pre&gt;&lt;code&gt;|000002d0:                     0100 0000 0400 f1ff|          ........
    704 |000002e0: 0000 0000 0000 0000 0000 0000 0000 0000|  ................
    705 
    706 st_name                    0x00000001
    707 st_info                    0x04 (STT_FILE)
    708 st_other                   0x00
    709 st_shndx                   0xfff1 (SHN_ABS)
    710 st_value                   0x0000000000000000
    711 st_size                    0x0000000000000000
    712 &lt;/code&gt;&lt;/pre&gt;
    713 &lt;h4 id=&#34;symbol-table-entry-4-hello-1&#34;&gt;Symbol table entry 4 (hello)&lt;/h4&gt;
    714 &lt;pre&gt;&lt;code&gt;|000002f0: 0b00 0000 0000 0200 d800 6000 0000 0000|  ..........`.....
    715 |00000300: 0000 0000 0000 0000                    |  ................
    716 
    717 st_name                    0x0000000b
    718 st_info                    0x00
    719 st_other                   0x00
    720 st_shndx                   0x0002 (Section 2: .data)
    721 st_value                   0x00000000006000d8
    722 st_size                    0x0000000000000000
    723 &lt;/code&gt;&lt;/pre&gt;
    724 &lt;h4 id=&#34;symbol-table-entry-5-hbytes-1&#34;&gt;Symbol table entry 5 (hbytes)&lt;/h4&gt;
    725 &lt;pre&gt;&lt;code&gt;|00000300:                     1100 0000 0000 f1ff|          ........
    726 |00000310: 0e00 0000 0000 0000 0000 0000 0000 0000|  ................
    727 
    728 st_name                    0x00000011
    729 st_info                    0x00
    730 st_other                   0x00
    731 st_shndx                   0xfff1 (SHN_ABS)
    732 st_value                   0x000000000000000e
    733 st_size                    0x0000000000000000
    734 &lt;/code&gt;&lt;/pre&gt;
    735 &lt;h4 id=&#34;symbol-table-entry-6-_start-1&#34;&gt;Symbol table entry 6 (_start)&lt;/h4&gt;
    736 &lt;pre&gt;&lt;code&gt;|00000320: 1800 0000 1000 0100 b000 4000 0000 0000|  ..........@.....
    737 |00000330: 0000 0000 0000 0000                    |  ........
    738 
    739 st_name                    0x00000018
    740 st_info                    0x10 (STB_GLOBAL)
    741 st_other                   0x00
    742 st_shndx                   0x0001 (Section 1: .text)
    743 st_value                   0x00000000004000b0
    744 st_size                    0x0000000000000000
    745 &lt;/code&gt;&lt;/pre&gt;
    746 &lt;h4 id=&#34;symbol-table-entry-7-__bss_start&#34;&gt;Symbol table entry 7 (__bss_start)&lt;/h4&gt;
    747 &lt;pre&gt;&lt;code&gt;|00000330:                     1f00 0000 1000 f1ff|          ........
    748 |00000340: e600 6000 0000 0000 0000 0000 0000 0000|  ..`.............
    749 
    750 st_name                    0x0000001f
    751 st_info                    0x10 (STB_GLOBAL)
    752 st_other                   0x00
    753 st_shndx                   0xfff1 (SHN_ABS)
    754 st_value                   0x00000000006000e6
    755 st_size                    0x0000000000000000
    756 &lt;/code&gt;&lt;/pre&gt;
    757 &lt;h4 id=&#34;symbol-table-entry-8-_edata&#34;&gt;Symbol table entry 8 (_edata)&lt;/h4&gt;
    758 &lt;pre&gt;&lt;code&gt;|00000350: 2b00 0000 1000 f1ff e600 6000 0000 0000|  +.........`.....
    759 |00000360: 0000 0000 0000 0000                    |  ........
    760 
    761 st_name                    0x0000002b
    762 st_info                    0x10 (STB_GLOBAL)
    763 st_other                   0x00
    764 st_shndx                   0xfff1 (SHN_ABS)
    765 st_value                   0x00000000006000e6
    766 st_size                    0x0000000000000000
    767 &lt;/code&gt;&lt;/pre&gt;
    768 &lt;h4 id=&#34;symbol-table-entry-9-_end&#34;&gt;Symbol table entry 9 (_end)&lt;/h4&gt;
    769 &lt;pre&gt;&lt;code&gt;|00000360:                     3200 0000 1000 f1ff|          2.......
    770 |00000370: e800 6000 0000 0000 0000 0000 0000 0000|  ..`.............
    771 
    772 st_name                    0x00000032
    773 st_info                    0x10 (STB_GLOBAL)
    774 st_other                   0x00
    775 st_shndx                   0xfff1 (SHN_ABS)
    776 st_value                   0x00000000006000e8
    777 st_size                    0x0000000000000000
    778 &lt;/code&gt;&lt;/pre&gt;
    779 &lt;h3 id=&#34;section-6-strtab-sht_strtab&#34;&gt;Section 6: .strtab (SHT_STRTAB;)&lt;/h3&gt;
    780 &lt;pre&gt;&lt;code&gt;|00000380: 0068 656c 6c6f 2e61 736d 0068 656c 6c6f|  .hello.asm.hello
    781 |00000390: 0068 6279 7465 7300 5f73 7461 7274 005f|  .hbytes._start._
    782 |000003a0: 5f62 7373 5f73 7461 7274 005f 6564 6174|  _bss_start._edat
    783 |000003b0: 6100 5f65 6e64 00                      |  a._end.
    784 
    785 0x00000000: &#39;&#39;
    786 0x00000001: &#39;hello.asm&#39;
    787 0x0000000b: &#39;hello&#39;
    788 0x00000011: &#39;hbytes&#39;
    789 0x00000018: &#39;_start&#39;
    790 0x0000001f: &#39;__bss_start&#39;
    791 0x0000002b: &#39;_edata&#39;
    792 0x00000032: &#39;_end&#39;
    793 &lt;/code&gt;&lt;/pre&gt;
    794 &lt;h2 id=&#34;effect-of-stripping&#34;&gt;Effect of stripping&lt;/h2&gt;
    795 &lt;p&gt;Running &lt;code&gt;strip&lt;/code&gt; on the binary has the effect of dropping the &lt;code&gt;.symtab&lt;/code&gt; and
    796 &lt;code&gt;.strtab&lt;/code&gt; sections along with their section headers and 16 bytes of data (the
    797 section names &lt;code&gt;.symtab&lt;/code&gt; and &lt;code&gt;.strtab&lt;/code&gt;) from the &lt;code&gt;.shstrtab&lt;/code&gt; section, reducing the
    798 total binary size to 512 bytes.&lt;/p&gt;
    799 &lt;h2 id=&#34;in-memory-process-image&#34;&gt;In-memory process image&lt;/h2&gt;
    800 &lt;p&gt;FreeBSD uses a memory superpage size of 2MB (page size of 4kB) on x86_64. Since
    801 attributes are set at the page level, read+execute program &lt;code&gt;.text&lt;/code&gt; and
    802 read+write &lt;code&gt;.data&lt;/code&gt; are loaded into two separate segments on separate pages, as
    803 laid-out by the linker.&lt;/p&gt;
    804 &lt;p&gt;On launch, the kernel maps the binary image into memory as specified in the
    805 program header table:&lt;/p&gt;
    806 &lt;ul&gt;
    807 &lt;li&gt;PHT Entry 0: The ELF header, program header table, and Section 1 (&lt;code&gt;.text&lt;/code&gt;)
    808 are mapped from offset 0x00 of the binary image (with length 0xd6 bytes)
    809 into Segment 1 (readable, executable) at address 0x400000.&lt;/li&gt;
    810 &lt;li&gt;PHT Entry 1: Section 2 (&lt;code&gt;.data&lt;/code&gt;) at offset 0xd8 of the binary image is
    811 mapped into Segment 2 (readable, writeable) at address 0x6000d8 from offset
    812 0xd8 with length 0x0e bytes.&lt;/li&gt;
    813 &lt;/ul&gt;
    814 &lt;p&gt;The program entrypoint is specified to be 0x4000b0, the start of the &lt;code&gt;.text&lt;/code&gt;
    815 section.&lt;/p&gt;
    816 &lt;p&gt;And that&amp;rsquo;s it! Any corrections or comments are always welcome. Shoot me an
    817 email at &lt;a href=&#34;mailto:chris@bracken.jp&#34;&gt;chris@bracken.jp&lt;/a&gt;.&lt;/p&gt;
    818 </description>
    819     </item>
    820     
    821     <item>
    822       <title>Installing Mozc on Ubuntu</title>
    823       <link>https://chris.bracken.jp/2011/04/installing-mozc-on-ubuntu/</link>
    824       <pubDate>Fri, 22 Apr 2011 00:00:00 +0000</pubDate>
    825       
    826       <guid>https://chris.bracken.jp/2011/04/installing-mozc-on-ubuntu/</guid>
    827       <description>&lt;p&gt;If you&amp;rsquo;re a Japanese speaker, one of the first things you do when you install a
    828 fresh Linux distribution is to install a decent &lt;a href=&#34;https://en.wikipedia.org/wiki/Japanese_IME&#34;&gt;Japanese IME&lt;/a&gt;.
    829 Ubuntu defaults to &lt;a href=&#34;https://sourceforge.jp/projects/anthy/news/&#34;&gt;Anthy&lt;/a&gt;, but I personally prefer &lt;a href=&#34;https://code.google.com/p/mozc/&#34;&gt;Mozc&lt;/a&gt;, and
    830 that&amp;rsquo;s what I&amp;rsquo;m going to show you how to install here.&lt;/p&gt;
    831 &lt;p&gt;&lt;em&gt;Update (2011-05-01):&lt;/em&gt; Found an older &lt;a href=&#34;https://www.youtube.com/watch?v=MfgjTCXZ2-s&#34;&gt;video tutorial&lt;/a&gt; on YouTube
    832 which provides an alternative (and potentially more comprehensive) solution for
    833 Japanese support on 10.10 using ibus instead of uim, which is the better choice
    834 for newer releases.&lt;/p&gt;
    835 &lt;p&gt;&lt;em&gt;Update (2011-10-25):&lt;/em&gt; The software installation part of this process got a
    836 whole lot easier in Ubuntu releases after Natty, and as noted above, I&amp;rsquo;d
    837 recommend sticking with ibus over uim.&lt;/p&gt;
    838 &lt;h3 id=&#34;japanese-input-basics&#34;&gt;Japanese Input Basics&lt;/h3&gt;
    839 &lt;p&gt;Before we get going, let&amp;rsquo;s understand a bit about how Japanese input works on
    840 computers. Japanese comprises three main character sets: the two phonetic
    841 character sets, hiragana and katakana at 50 characters each, plus many
    842 thousands of Kanji, each with multiple readings. Clearly a full keyboard is
    843 impractical, so a mapping is required.&lt;/p&gt;
    844 &lt;p&gt;Input happens in two steps. First, you input the text phonetically, then you
    845 convert it to a mix of kanji and kana.&lt;/p&gt;
    846 &lt;figure&gt;&lt;img src=&#34;https://chris.bracken.jp/post/2011-04-22-henkan.png&#34;
    847     alt=&#34;Japanese IME completion menu&#34;&gt;
    848 &lt;/figure&gt;
    849 
    850 &lt;p&gt;Over the years, two main mechanisms evolved to input kana. The first was common
    851 on old &lt;em&gt;wapuro&lt;/em&gt;, and assigns a kana to each key on the keyboard—e.g. where
    852 the &lt;em&gt;A&lt;/em&gt; key appears on a QWERTY keyboard, you&amp;rsquo;ll find a ち. This is how our
    853 grandparents hacked out articles for the local &lt;em&gt;shinbun&lt;/em&gt;, but I suspect only a
    854 few die-hard traditionalists still do this. The second and more common method
    855 is literal &lt;a href=&#34;https://en.wikipedia.org/wiki/Wapuro&#34;&gt;transliteration of roman characters into kana&lt;/a&gt;. You
    856 type &lt;em&gt;fujisan&lt;/em&gt; and out comes ふじさん.&lt;/p&gt;
    857 &lt;p&gt;Once the phonetic kana have been input, you execute a conversion step wherein
    858 the input is transformed into the appropriate mix of kanji and kana. Given the
    859 large number of homonyms in Japanese, this step often involves disambiguating
    860 your input by selecting the intended kanji. For example, the &lt;em&gt;mita&lt;/em&gt; in &lt;em&gt;eiga wo
    861 mita&lt;/em&gt; (I watched a movie) is properly rendered as 観た whereas the &lt;em&gt;mita&lt;/em&gt; in
    862 &lt;em&gt;kuruma wo mita&lt;/em&gt; (I saw a car) should be 見た, and in neither case is it &lt;em&gt;mita&lt;/em&gt;
    863 as in the place name &lt;em&gt;Mita-bashi&lt;/em&gt; (Mita bridge) which is written 三田.&lt;/p&gt;
    864 &lt;h3 id=&#34;some-implementation-details&#34;&gt;Some Implementation Details&lt;/h3&gt;
    865 &lt;p&gt;Let&amp;rsquo;s look at implementation. There are two main components used in inputting
    866 Japanese text:&lt;/p&gt;
    867 &lt;p&gt;The GUI system (e.g. ibus, uim) is responsible for:&lt;/p&gt;
    868 &lt;ol&gt;
    869 &lt;li&gt;Maintaining and switching the current input mode:
    870 ローマ字、ひらがな、カタカナ、半額カタカナ.&lt;/li&gt;
    871 &lt;li&gt;Transliteration of character input into kana: &lt;em&gt;ku&lt;/em&gt; into く,
    872 &lt;em&gt;nekko&lt;/em&gt; into ねっこ, &lt;em&gt;xtu&lt;/em&gt; into っ.&lt;/li&gt;
    873 &lt;li&gt;Managing the text under edit (the underlined stuff) and the
    874 drop-down list of transliterations.&lt;/li&gt;
    875 &lt;li&gt;Ancillary functions such as supplying a GUI for custom dictionary
    876 management, kanji lookup by radical, etc.&lt;/li&gt;
    877 &lt;/ol&gt;
    878 &lt;p&gt;The transliteration engine (e.g. Anthy, Mozc) is responsible for transforming a
    879 piece of input text, usually in kana form, into kanji: for example みる into
    880 one of: 見る、観る、診る、視る. This involves:&lt;/p&gt;
    881 &lt;ol&gt;
    882 &lt;li&gt;Breaking the input phrase into components.&lt;/li&gt;
    883 &lt;li&gt;Transforming each component into the appropriate best guess based on context
    884 and historical input.&lt;/li&gt;
    885 &lt;li&gt;Supplying alternative transformations in case the best guess was incorrect.&lt;/li&gt;
    886 &lt;/ol&gt;
    887 &lt;h3 id=&#34;why-mozc&#34;&gt;Why Mozc?&lt;/h3&gt;
    888 &lt;p&gt;TL;DR: because it&amp;rsquo;s better. Have a look at the conversion list up at the top of
    889 this post. The input is &lt;em&gt;kinou&lt;/em&gt;, for which there are two main conversion
    890 candidates: 機能 (feature) and 昨日 (yesterday). Notice however, that it also
    891 supplies several conversions for yesterday&amp;rsquo;s date in various formats, including
    892 「平成23年4月21日」 using &lt;a href=&#34;https://en.wikipedia.org/wiki/Japanese_era_name&#34;&gt;Japanese Era Name&lt;/a&gt; rather than the
    893 Western notation 2011. This is just one small improvement among dozens of
    894 clever tricks it performs. If you&amp;rsquo;re thinking this bears an uncanny resemblance
    895 to tricks that &lt;a href=&#34;https://www.google.com/intl/ja/ime/&#34;&gt;Google&amp;rsquo;s Japanese IME&lt;/a&gt; supports, you&amp;rsquo;re right: Mozc
    896 originated from the same codebase.&lt;/p&gt;
    897 &lt;h3 id=&#34;switching-to-mozc&#34;&gt;Switching to Mozc&lt;/h3&gt;
    898 &lt;p&gt;So let&amp;rsquo;s assume you&amp;rsquo;re now convinced to abandon Anthy and switch to Mozc.
    899 You&amp;rsquo;ll need to make some changes. Here are the steps:&lt;/p&gt;
    900 &lt;p&gt;If you haven&amp;rsquo;t yet done so, install some Japanese fonts from either Software
    901 Centre or Synaptic. I&amp;rsquo;d recommend grabbing the &lt;em&gt;ttf-takao&lt;/em&gt; package.&lt;/p&gt;
    902 &lt;p&gt;Next up, we&amp;rsquo;ll install and configure Mozc.&lt;/p&gt;
    903 &lt;ol&gt;
    904 &lt;li&gt;&lt;strong&gt;Install ibus-mozc:&lt;/strong&gt; &lt;code&gt;sudo apt-get install ibus-mozc&lt;/code&gt;&lt;/li&gt;
    905 &lt;li&gt;&lt;strong&gt;Restart the ibus daemon:&lt;/strong&gt; &lt;code&gt;/usr/bin/ibus-daemon --xim -r -d&lt;/code&gt;&lt;/li&gt;
    906 &lt;li&gt;&lt;strong&gt;Set your input method to mozc:&lt;/strong&gt;
    907 &lt;ol&gt;
    908 &lt;li&gt;Open &lt;em&gt;Keyboard Input Methods&lt;/em&gt; settings.&lt;/li&gt;
    909 &lt;li&gt;Select the &lt;em&gt;Input Method&lt;/em&gt; tab.&lt;/li&gt;
    910 &lt;li&gt;From the &lt;em&gt;Select an input method&lt;/em&gt; drop-down, select Japanese, then mozc from
    911 the sub-menu.&lt;/li&gt;
    912 &lt;li&gt;Select &lt;em&gt;Japanese - Anthy&lt;/em&gt; from the list, if it appears there, and click
    913 &lt;em&gt;Remove&lt;/em&gt;.&lt;/li&gt;
    914 &lt;/ol&gt;
    915 &lt;/li&gt;
    916 &lt;li&gt;&lt;strong&gt;Optionally, remove Anthy from your system:&lt;/strong&gt; &lt;code&gt;sudo apt-get autoremove anthy&lt;/code&gt;&lt;/li&gt;
    917 &lt;/ol&gt;
    918 &lt;p&gt;Log out, and back in. You should see an input method menu in the menu
    919 bar at the top of the screen.&lt;/p&gt;
    920 &lt;p&gt;That&amp;rsquo;s it, Mozcを楽しんでください!&lt;/p&gt;
    921 </description>
    922     </item>
    923     
    924     <item>
    925       <title>Google Reader</title>
    926       <link>https://chris.bracken.jp/2007/05/google-reader/</link>
    927       <pubDate>Wed, 30 May 2007 00:00:00 +0000</pubDate>
    928       
    929       <guid>https://chris.bracken.jp/2007/05/google-reader/</guid>
    930       <description>&lt;p&gt;For years, I&amp;rsquo;ve been a fan of &lt;a href=&#34;http://inessential.com/&#34;&gt;Brent Simmons&amp;rsquo;&lt;/a&gt; OS X-based feed
    931 reader, &lt;a href=&#34;http://www.newsgator.com/Individuals/NetNewsWire/&#34;&gt;NetNewsWire&lt;/a&gt;. It&amp;rsquo;s a fantastic application, and I&amp;rsquo;ve definitely
    932 got my money&amp;rsquo;s worth out of it. After partnering with &lt;a href=&#34;http://newsgator.com/&#34;&gt;NewsGator&lt;/a&gt;, I
    933 started using their online feed-reader on and off, with mixed
    934 results. I like that it keeps my feeds in sync between my computers,
    935 and that I can browse articles at lunch, but the interface is still not on par
    936 with NetNewsWire itself.&lt;/p&gt;
    937 &lt;p&gt;While NewsGator&amp;rsquo;s implementation was lacking, I really did like the idea of
    938 dropping the desktop app altogether and going with a fully online solution, so
    939 I started exploring other options. The obvious free alternative is &lt;a href=&#34;http://www.google.com/reader/&#34;&gt;Google
    940 Reader&lt;/a&gt;, and I have to say, I&amp;rsquo;m impressed. While the
    941 presentation isn&amp;rsquo;t as customizable as NetNewsWire, the functionality that I use
    942 is all there, and in fact, it has some extra search features that I miss on the
    943 desktop. It was only when I launched NetNewsWire today and saw 290 unread
    944 items, that it hit me I hadn&amp;rsquo;t used it in almost a month. So while I look
    945 forward to &lt;a href=&#34;http://www.flickr.com/photos/hicksdesign/210309912/&#34;&gt;NetNewsWire 3&lt;/a&gt;, I&amp;rsquo;m sticking to Google Reader for the time
    946 being.&lt;/p&gt;
    947 &lt;figure&gt;&lt;img src=&#34;https://chris.bracken.jp/post/2007-05-30-google-reader.png&#34;
    948     alt=&#34;Google reader graph of usage by hour of day&#34;&gt;
    949 &lt;/figure&gt;
    950 
    951 &lt;p&gt;I also discovered that my prime news reading hours are apparently 6:30am to
    952 7:30am and 9pm to 11pm, with a strange local maximum straggling out around
    953 12:30am. I&amp;rsquo;d be curious to compare this to &lt;em&gt;before&lt;/em&gt; I had a baby that woke me
    954 up around that time.&lt;/p&gt;
    955 &lt;p&gt;&lt;em&gt;Update (2007-06-06):&lt;/em&gt; NetNewsWire 3.0 is now out.&lt;/p&gt;
    956 </description>
    957     </item>
    958     
    959   </channel>
    960 </rss>