Fix to btrfs-progs to avoid "underlinking"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Attached is a simple patch to the makefile line that builds "convert".
 It explicitly includes libcom_err, which is implicitly pulled in by
libext2fs.  This fixes a what is called "underlinking" in this blog
post:

    http://blog.flameeyes.eu/2010/11/26/it-s-not-all-gold-that-shines-why-underlinking-is-a-bad-thing

Apparently, this condition causes links to fail using the "gold link
editor", and it can cause future library version incompatibilities to
not be detected (so that affected programs can be rebuilt).

-Joe

[Note: please CC my email address in any responses]
--- btrfs-progs-0.19/Makefile~	2011-06-05 10:21:04.000000000 -0600
+++ btrfs-progs-0.19/Makefile	2011-06-05 10:21:46.000000000 -0600
@@ -75,7 +75,7 @@ quick-test: $(objects) quick-test.o
 	gcc $(CFLAGS) -o quick-test $(objects) quick-test.o $(LDFLAGS) $(LIBS)
 
 convert: $(objects) convert.o
-	gcc $(CFLAGS) -o btrfs-convert $(objects) convert.o -lext2fs $(LDFLAGS) $(LIBS)
+	gcc $(CFLAGS) -o btrfs-convert $(objects) convert.o -lext2fs -lcom_err $(LDFLAGS) $(LIBS)
 
 ioctl-test: $(objects) ioctl-test.o
 	gcc $(CFLAGS) -o ioctl-test $(objects) ioctl-test.o $(LDFLAGS) $(LIBS)

[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux