As per the subject... ChangeLog: * common/common-utils.c (read_alloc, read_stralloc): Move definitions from target.c. * common/common-utils.h (read_alloc_pread_ftype): New typedef. (read_alloc): New declaration. (read_stralloc_func_ftype): New typedef. (read_stralloc): New declaration. * common/linux-maps.c (fcntl.h, unistd.h, target.h, gdb_assert.h, ctype.h, string.h): Include. (read_mapping): Move from linux-tdep.c. (linux_find_memory_read_stralloc_1_pread): New function. (linux_find_memory_read_stralloc_1): New function. (linux_find_memory_read_stralloc): New function. * common/linux-maps.h (read_mapping): New declaration. (linux_find_memory_region_ftype): Moved typedef from linux-tdep.c. (linux_find_memory_regions_full): New declaration. * linux-tdep.c (linux-maps.h): Include. (read_mapping): Moved to common/linux-maps.c. (linux_find_memory_region_ftype): Moved typedef to common/linux-maps.h. (linux_find_memory_regions_full): Moved definition to common/linux-maps.c. * target.c (read_alloc_pread_ftype): Moved typedef to common/common-utils.h. (read_alloc, read_stralloc): Moved definitions to common/common-utils.c. ---