diff --git a/Makefile b/Makefile
index d3c1ba5..7a48889 100644
--- a/Makefile
+++ b/Makefile
@@ -353,7 +353,7 @@
 ###############################################################################
 # Library code.
 
-LIB_OBJS = layout.o flashrom.o udelay.o programmer.o
+LIB_OBJS = layout.o flashrom.o udelay.o programmer.o helpers.o
 
 ###############################################################################
 # Frontend related stuff.
diff --git a/at45db.c b/at45db.c
index 41fc497..5396d7f 100644
--- a/at45db.c
+++ b/at45db.c
@@ -215,17 +215,6 @@
 	return 1;
 }
 
-/* Returns the minimum number of bits needed to represent the given address.
- * FIXME: use mind-blowing implementation.
- * FIXME: move to utility module. */
-static uint32_t address_to_bits(uint32_t addr)
-{
-	unsigned int lzb = 0;
-	while (((1 << (31 - lzb)) & ~addr) != 0)
-		lzb++;
-	return 32 - lzb;
-}
-
 /* In case of non-power-of-two page sizes we need to convert the address flashrom uses to the address the
  * DataFlash chips use. The latter uses a segmented address space where the page address is encoded in the
  * more significant bits and the offset within the page is encoded in the less significant bits. The exact
diff --git a/flash.h b/flash.h
index cf496b6..cb53ad1 100644
--- a/flash.h
+++ b/flash.h
@@ -241,6 +241,14 @@
 int print_supported(void);
 void print_supported_wiki(void);
 
+/* helpers.c */
+uint32_t address_to_bits(uint32_t addr);
+int bitcount(unsigned long a);
+int max(int a, int b);
+int min(int a, int b);
+char *strcat_realloc(char *dest, const char *src);
+void tolower_string(char *str);
+
 /* flashrom.c */
 extern int verbose_screen;
 extern int verbose_logfile;
@@ -251,13 +259,9 @@
 int erase_flash(struct flashctx *flash);
 int probe_flash(struct registered_programmer *pgm, int startchip, struct flashctx *fill_flash, int force);
 int read_flash_to_file(struct flashctx *flash, const char *filename);
-int min(int a, int b);
-int max(int a, int b);
-void tolower_string(char *str);
 char *extract_param(const char *const *haystack, const char *needle, const char *delim);
 int verify_range(struct flashctx *flash, const uint8_t *cmpbuf, unsigned int start, unsigned int len);
 int need_erase(const uint8_t *have, const uint8_t *want, unsigned int len, enum write_granularity gran);
-char *strcat_realloc(char *dest, const char *src);
 void print_version(void);
 void print_buildinfo(void);
 void print_banner(void);
diff --git a/flashrom.c b/flashrom.c
index a8a8533..c9e0d01 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -535,42 +535,6 @@
 	return 0;
 }
 
-int min(int a, int b)
-{
-	return (a < b) ? a : b;
-}
-
-int max(int a, int b)
-{
-	return (a > b) ? a : b;
-}
-
-int bitcount(unsigned long a)
-{
-	int i = 0;
-	for (; a != 0; a >>= 1)
-		if (a & 1)
-			i++;
-	return i;
-}
-
-void tolower_string(char *str)
-{
-	for (; *str != '\0'; str++)
-		*str = (char)tolower((unsigned char)*str);
-}
-
-char *strcat_realloc(char *dest, const char *src)
-{
-	dest = realloc(dest, strlen(dest) + strlen(src) + 1);
-	if (!dest) {
-		msg_gerr("Out of memory!\n");
-		return NULL;
-	}
-	strcat(dest, src);
-	return dest;
-}
-
 /* This is a somewhat hacked function similar in some ways to strtok().
  * It will look for needle with a subsequent '=' in haystack, return a copy of
  * needle and remove everything from the first occurrence of needle to the next
diff --git a/helpers.c b/helpers.c
new file mode 100644
index 0000000..63fc880
--- /dev/null
+++ b/helpers.c
@@ -0,0 +1,72 @@
+/*
+ * This file is part of the flashrom project.
+ *
+ * Copyright (C) 2009-2010 Carl-Daniel Hailfinger
+ * Copyright (C) 2013 Stefan Tauner
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#include "flash.h"
+
+/* Returns the minimum number of bits needed to represent the given address.
+ * FIXME: use mind-blowing implementation. */
+uint32_t address_to_bits(uint32_t addr)
+{
+	unsigned int lzb = 0;
+	while (((1 << (31 - lzb)) & ~addr) != 0)
+		lzb++;
+	return 32 - lzb;
+}
+
+int bitcount(unsigned long a)
+{
+	int i = 0;
+	for (; a != 0; a >>= 1)
+		if (a & 1)
+			i++;
+	return i;
+}
+
+int max(int a, int b)
+{
+	return (a > b) ? a : b;
+}
+
+int min(int a, int b)
+{
+	return (a < b) ? a : b;
+}
+
+char *strcat_realloc(char *dest, const char *src)
+{
+	dest = realloc(dest, strlen(dest) + strlen(src) + 1);
+	if (!dest) {
+		msg_gerr("Out of memory!\n");
+		return NULL;
+	}
+	strcat(dest, src);
+	return dest;
+}
+
+void tolower_string(char *str)
+{
+	for (; *str != '\0'; str++)
+		*str = (char)tolower((unsigned char)*str);
+}
+
