diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-24 14:54:27 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-24 14:54:27 +0000 |
commit | 0b35470d9b5e75a7a1df2e6860b48831e7920353 (patch) | |
tree | 1bf3d6658a938f85d25b1febe8185eab75274ddd | |
parent | cf30cc82a343802b601f01ae153916887f11eb7b (diff) | |
download | busybox-w32-0b35470d9b5e75a7a1df2e6860b48831e7920353.tar.gz busybox-w32-0b35470d9b5e75a7a1df2e6860b48831e7920353.tar.bz2 busybox-w32-0b35470d9b5e75a7a1df2e6860b48831e7920353.zip |
glibc makedev() is a large inline. Save 700+ bytes by wrapping it
into a function.
-rw-r--r-- | include/libbb.h | 6 | ||||
-rw-r--r-- | libbb/Kbuild | 122 |
2 files changed, 96 insertions, 32 deletions
diff --git a/include/libbb.h b/include/libbb.h index ad64bad84..582e34f52 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -509,6 +509,12 @@ extern unsigned long get_ug_id(const char *s, long (*__bb_getxxnam)(const char * | |||
509 | int is_in_ino_dev_hashtable(const struct stat *statbuf, char **name); | 509 | int is_in_ino_dev_hashtable(const struct stat *statbuf, char **name); |
510 | void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name); | 510 | void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name); |
511 | void reset_ino_dev_hashtable(void); | 511 | void reset_ino_dev_hashtable(void); |
512 | #ifdef __GLIBC__ | ||
513 | /* At least glibc has horrendously large inline for this, so wrap it */ | ||
514 | extern unsigned long long bb_makedev(unsigned int major, unsigned int minor); | ||
515 | #undef makedev | ||
516 | #define makedev(a,b) bb_makedev(a,b) | ||
517 | #endif | ||
512 | 518 | ||
513 | 519 | ||
514 | #ifndef COMM_LEN | 520 | #ifndef COMM_LEN |
diff --git a/libbb/Kbuild b/libbb/Kbuild index 0dd8c2be4..fc4798bf3 100644 --- a/libbb/Kbuild +++ b/libbb/Kbuild | |||
@@ -4,31 +4,96 @@ | |||
4 | # | 4 | # |
5 | # Licensed under the GPL v2, see the file LICENSE in this tarball. | 5 | # Licensed under the GPL v2, see the file LICENSE in this tarball. |
6 | 6 | ||
7 | lib-y:= \ | 7 | lib-y:= |
8 | ask_confirmation.o change_identity.o chomp.o \ | 8 | |
9 | compare_string_array.o concat_path_file.o copy_file.o copyfd.o \ | 9 | lib-y += ask_confirmation.o |
10 | crc32.o create_icmp_socket.o create_icmp6_socket.o \ | 10 | lib-y += bb_askpass.o |
11 | device_open.o dump.o error_msg.o error_msg_and_die.o \ | 11 | lib-y += bb_do_delay.o |
12 | find_pid_by_name.o find_root_device.o fgets_str.o \ | 12 | lib-y += bb_pwd.o |
13 | full_write.o get_last_path_component.o get_line_from_file.o \ | 13 | lib-y += change_identity.o |
14 | herror_msg.o herror_msg_and_die.o \ | 14 | lib-y += chomp.o |
15 | human_readable.o inet_common.o inode_hash.o isdirectory.o \ | 15 | lib-y += compare_string_array.o |
16 | kernel_version.o last_char_is.o login.o \ | 16 | lib-y += concat_path_file.o |
17 | make_directory.o md5.o mode_string.o mtab_file.o \ | 17 | lib-y += concat_subpath_file.o |
18 | obscure.o parse_mode.o perror_msg.o \ | 18 | lib-y += copy_file.o |
19 | perror_msg_and_die.o get_console.o \ | 19 | lib-y += copyfd.o |
20 | process_escape_sequence.o procps.o \ | 20 | lib-y += crc32.o |
21 | recursive_action.o remove_file.o \ | 21 | lib-y += create_icmp6_socket.o |
22 | restricted_shell.o run_parts.o run_shell.o read.o safe_write.o \ | 22 | lib-y += create_icmp_socket.o |
23 | safe_strncpy.o setup_environment.o sha1.o simplify_path.o \ | 23 | lib-y += default_error_retval.o |
24 | trim.o u_signal_names.o vdprintf.o verror_msg.o \ | 24 | lib-y += device_open.o |
25 | vherror_msg.o vperror_msg.o wfopen.o xconnect.o xgetcwd.o \ | 25 | lib-y += dump.o |
26 | xgethostbyname.o xgethostbyname2.o xreadlink.o \ | 26 | lib-y += error_msg.o |
27 | fclose_nonstdin.o fflush_stdout_and_exit.o \ | 27 | lib-y += error_msg_and_die.o |
28 | getopt32.o default_error_retval.o wfopen_input.o speed_table.o \ | 28 | lib-y += execable.o |
29 | perror_nomsg_and_die.o perror_nomsg.o skip_whitespace.o bb_askpass.o \ | 29 | lib-y += fclose_nonstdin.o |
30 | warn_ignoring_args.o concat_subpath_file.o vfork_daemon_rexec.o \ | 30 | lib-y += fflush_stdout_and_exit.o |
31 | bb_do_delay.o uuencode.o info_msg.o vinfo_msg.o execable.o | 31 | lib-y += fgets_str.o |
32 | lib-y += find_pid_by_name.o | ||
33 | lib-y += find_root_device.o | ||
34 | lib-y += full_write.o | ||
35 | lib-y += get_console.o | ||
36 | lib-y += get_last_path_component.o | ||
37 | lib-y += get_line_from_file.o | ||
38 | lib-y += getopt32.o | ||
39 | lib-y += herror_msg.o | ||
40 | lib-y += herror_msg_and_die.o | ||
41 | lib-y += human_readable.o | ||
42 | lib-y += inet_common.o | ||
43 | lib-y += info_msg.o | ||
44 | lib-y += inode_hash.o | ||
45 | lib-y += isdirectory.o | ||
46 | lib-y += kernel_version.o | ||
47 | lib-y += last_char_is.o | ||
48 | lib-y += llist.o | ||
49 | lib-y += login.o | ||
50 | lib-y += make_directory.o | ||
51 | lib-y += makedev.o | ||
52 | lib-y += md5.o | ||
53 | lib-y += messages.o | ||
54 | lib-y += mode_string.o | ||
55 | lib-y += mtab_file.o | ||
56 | lib-y += obscure.o | ||
57 | lib-y += parse_mode.o | ||
58 | lib-y += perror_msg.o | ||
59 | lib-y += perror_msg_and_die.o | ||
60 | lib-y += perror_nomsg.o | ||
61 | lib-y += perror_nomsg_and_die.o | ||
62 | lib-y += process_escape_sequence.o | ||
63 | lib-y += procps.o | ||
64 | lib-y += read.o | ||
65 | lib-y += recursive_action.o | ||
66 | lib-y += remove_file.o | ||
67 | lib-y += restricted_shell.o | ||
68 | lib-y += run_parts.o | ||
69 | lib-y += run_shell.o | ||
70 | lib-y += safe_strncpy.o | ||
71 | lib-y += safe_strtol.o | ||
72 | lib-y += safe_write.o | ||
73 | lib-y += setup_environment.o | ||
74 | lib-y += sha1.o | ||
75 | lib-y += simplify_path.o | ||
76 | lib-y += skip_whitespace.o | ||
77 | lib-y += speed_table.o | ||
78 | lib-y += trim.o | ||
79 | lib-y += u_signal_names.o | ||
80 | lib-y += uuencode.o | ||
81 | lib-y += vdprintf.o | ||
82 | lib-y += verror_msg.o | ||
83 | lib-y += vfork_daemon_rexec.o | ||
84 | lib-y += vherror_msg.o | ||
85 | lib-y += vinfo_msg.o | ||
86 | lib-y += vperror_msg.o | ||
87 | lib-y += warn_ignoring_args.o | ||
88 | lib-y += wfopen.o | ||
89 | lib-y += wfopen_input.o | ||
90 | lib-y += xatol.o | ||
91 | lib-y += xconnect.o | ||
92 | lib-y += xfuncs.o | ||
93 | lib-y += xgetcwd.o | ||
94 | lib-y += xgethostbyname.o | ||
95 | lib-y += xgethostbyname2.o | ||
96 | lib-y += xreadlink.o | ||
32 | 97 | ||
33 | # conditionally compiled objects: | 98 | # conditionally compiled objects: |
34 | lib-$(CONFIG_FEATURE_MOUNT_LOOP) += loop.o | 99 | lib-$(CONFIG_FEATURE_MOUNT_LOOP) += loop.o |
@@ -51,10 +116,3 @@ lib-$(CONFIG_AWK) += xregcomp.o | |||
51 | lib-$(CONFIG_SED) += xregcomp.o | 116 | lib-$(CONFIG_SED) += xregcomp.o |
52 | lib-$(CONFIG_LESS) += xregcomp.o | 117 | lib-$(CONFIG_LESS) += xregcomp.o |
53 | lib-$(CONFIG_DEVFSD) += xregcomp.o | 118 | lib-$(CONFIG_DEVFSD) += xregcomp.o |
54 | |||
55 | lib-y += messages.o | ||
56 | lib-y += xfuncs.o | ||
57 | lib-y += xatol.o | ||
58 | lib-y += safe_strtol.o | ||
59 | lib-y += bb_pwd.o | ||
60 | lib-y += llist.o | ||