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.

Encryption and Corruption - how I saved my encyrpted volume

My dell laptop battery is slowly losing it's moxy. It's juice so to speak. This does not mix well with Florida summer time weather as the power tends to go out A LOT.

A few months or years ago, I decided I needed to encipher my /home directory. I keep just about everything, neatly stored away, and if I were to ever lose my laptop then it would be a small gift of my inner most workings to the ill-gotten new owner.

I used truecrypt for this task.

Visual Studios 2008 and Installer Projects

So, after pulling my hair out and lots of searches on this matter, I finally figured out the problem to my dilemma.

I have a .Net service which hits a webservice every 5 minutes or so.

I created a Windows Installer Project in order to get it deployed by my IT department.

First, my timer wasn't firing when it was supposed to fire. Why? Well, when you create a System.Timers.Timer object, and after you set all the properties.. you have to ENABLE IT! Yes, it's created with Enabled being false. You have to enable it after it's created.

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:

Gentoo emerge world's new udev, lvm2 and rootvol

So one day, I was doing an

  • emerge -Datuv world

and I noticed that udev and lvm2 where being blocked by device-mapper. This is due to libdevice-mapper.so being included in the new version of lvm2.

Well, this causes a problem on reboot if you're using lvm2 on your root volume (/). This outlines what I did to fix it.

  • Resolve your blocked packages by emerge -C package
  • Edit your initrd-lvm2.img.gz

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