gonoph's blog

LD_PRELOAD example library with example code!


I had a desire, or a nerdy, geeky need to create this library that overrides:

  • int execv(const char *path, char *const argv[]);
  • int execvp(const char *file, char *const argv[]);
  • int execve(const char *path, char *const argv[], char *const envp[]);

Upon initialization, all original function pointers are saved via the constructor, as defined here: http://tldp.org/HOWTO/Program-Library-HOWTO/miscellaneous.html#INIT-AND-...

2012 St Pete Grand Prix Animation for Anna

I lost a dear friend a few months ago, and the St Pete Grand Prix was the last time some of us saw her. I took several rapid pictures of the racecars in anticipation of creating a gif animation of the action.

I'm just now getting around to it.

Miss you, Anna.

(view full article for image)

Gentoo and upgrades

I should remember to upgrade my Gentoo box on a regular basis. I should do this, because it will keep the updates to a minimum, and allow me to determine which portion of the mass of changes is going to affect my installs.

I should. But I don't.

Case in point.

Today, I updated. I upgraded my kernel from 2.6 to 3.2. After a reboot, everything was fine. I then upgraded some commonly used software, such as openssl, fluxbox, firefox, etc. I then worked happily and forgot about it.

The next day. X is br0ken. It is unable to find an ssl library. Oh crap.

squashfs, gentoo, squashfs-tools, and gcc

To start, this is part of my environment.

$ gcc-config -l
[1] i686-pc-linux-gnu-4.1.2
[2] i686-pc-linux-gnu-4.3.4 *

I was running into issues trying to unsquashfs one of my ISOs.

When I built it using gcc-4.1.2 (my default on my development workstation), I get this:

$ unsquash -ls my.squash
Parallel unsquashfs: Using 2 processors
FATAL ERROR aborting: failed to read fragment table

After some messing around on multiple systems, I found two things:

Timewarp Dance to 80x86 assembler

# This assembler code is Copyright (C) 2009 Billy Holmes at gonoph.net
# Copyright (C) 2010 (fixed a logic bug)
# Released and Licensed under GPLv2
# http://www.gonoph.net/gpl-2.0.txt
# Lyrics upon which it is based by Richard O'Brien and Richard Hartley
# http://en.wikipedia.org/wiki/The_Rocky_Horror_Picture_Show
# Coded in gnu assembler
# Why? Couldn't resist

.section .data
.set _right, 0x00000001
.set _hands, 0x00000002
.set _knees, 0xffffffff

   .long 0x0
   .long 0x0

Converting Xorg from fglrx to ati driver

For some strange reason, I was having crash issues using fglrx on my desktop. In addition, my laptop would sometimes kernel fault using the fglrx. Both systems use ATI chipsets that are supported under the Linux kernel's radeon.ko driver.

# List Video cards
$ lspci | grep ATI
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility X1400
# OR this

$ lspci | grep ATI
01:00.0 VGA compatible controller: ATI Technologies Inc RV516 [Radeon X1300/X1550 Series]

Recent comments

Syndicate content