diff --git a/core/includes/common.inc b/core/includes/common.inc
index 54d4212..9a3fabf 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -400,14 +400,17 @@ function drupal_add_feed($url = NULL, $title = '') {
   if (isset($url)) {
     $stored_feed_links[$url] = theme('feed_icon', array('url' => $url, 'title' => $title));
 
-    drupal_add_html_head_link(array(
-      'rel' => 'alternate',
-      'type' => 'application/rss+xml',
-      'title' => $title,
-      // Force the URL to be absolute, for consistency with other <link> tags
-      // output by Drupal.
-      'href' => url($url, array('absolute' => TRUE)),
-    ));
+    $build['#attached']['drupal_add_html_head_link'][] = array(
+      array(
+        'rel' => 'alternate',
+        'type' => 'application/rss+xml',
+        'title' => $title,
+        // Force the URL to be absolute, for consistency with other <link> tags
+        // output by Drupal.
+        'href' => url($url, array('absolute' => TRUE)),
+      ),
+    );
+    drupal_render($build);
   }
   return $stored_feed_links;
 }
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index e49bb76..5ad134b 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -2555,7 +2555,14 @@ function template_preprocess_html(&$variables) {
   if (theme_get_setting('features.favicon')) {
     $favicon = theme_get_setting('favicon.url');
     $type = theme_get_setting('favicon.mimetype');
-    drupal_add_html_head_link(array('rel' => 'shortcut icon', 'href' => Url::stripDangerousProtocols($favicon), 'type' => $type));
+    $build['#attached']['drupal_add_html_head_link'][] = array(
+      array(
+        'rel' => 'shortcut icon',
+        'href' => Url::stripDangerousProtocols($favicon),
+        'type' => $type
+      ),
+    );
+    drupal_render($build);
   }
 
   $site_config = \Drupal::config('system.site');
@@ -2838,7 +2845,14 @@ function template_preprocess_maintenance_page(&$variables) {
   if (theme_get_setting('features.favicon')) {
     $favicon = theme_get_setting('favicon.url');
     $type = theme_get_setting('favicon.mimetype');
-    drupal_add_html_head_link(array('rel' => 'shortcut icon', 'href' => Url::stripDangerousProtocols($favicon), 'type' => $type));
+    $build['#attached']['drupal_add_html_head_link'][] = array(
+      array(
+        'rel' => 'shortcut icon',
+        'href' => Url::stripDangerousProtocols($favicon),
+        'type' => $type
+      ),
+    );
+    drupal_render($build);
   }
 
   // Get all region content set with drupal_add_region_content().
diff --git a/core/modules/book/book.module b/core/modules/book/book.module
index aef8a52..df45205 100644
--- a/core/modules/book/book.module
+++ b/core/modules/book/book.module
@@ -715,21 +715,39 @@ function template_preprocess_book_navigation(&$variables) {
 
     if ($prev = book_prev($book_link)) {
       $prev_href = url($prev['href']);
-      drupal_add_html_head_link(array('rel' => 'prev', 'href' => $prev_href));
+      $build['#attached']['drupal_add_html_head_link'][] = array(
+        array(
+          'rel' => 'prev',
+          'href' => $prev_href
+        ),
+      );
+      drupal_render($build);
       $variables['prev_url'] = $prev_href;
       $variables['prev_title'] = check_plain($prev['title']);
     }
 
     if ($book_link['plid'] && $parent = book_link_load($book_link['plid'])) {
       $parent_href = url($parent['link_path']);
-      drupal_add_html_head_link(array('rel' => 'up', 'href' => $parent_href));
+      $build['#attached']['drupal_add_html_head_link'][] = array(
+        array(
+          'rel' => 'up',
+          'href' => $parent_href
+        ),
+      );
+      drupal_render($build);
       $variables['parent_url'] = $parent_href;
       $variables['parent_title'] = check_plain($parent['title']);
     }
 
     if ($next = book_next($book_link)) {
       $next_href = url($next['href']);
-      drupal_add_html_head_link(array('rel' => 'next', 'href' => $next_href));
+      $build['#attached']['drupal_add_html_head_link'][] = array(
+        array(
+          'rel' => 'next',
+          'href' => $next_href
+        )
+      );
+      drupal_render($build);
       $variables['next_url'] = $next_href;
       $variables['next_title'] = check_plain($next['title']);
     }
diff --git a/core/modules/taxonomy/taxonomy.pages.inc b/core/modules/taxonomy/taxonomy.pages.inc
index 3cf82e2..a8794a0 100644
--- a/core/modules/taxonomy/taxonomy.pages.inc
+++ b/core/modules/taxonomy/taxonomy.pages.inc
@@ -24,11 +24,26 @@ function taxonomy_term_page(Term $term) {
   foreach ($term->uriRelationships() as $rel) {
     $uri = $term->uri($rel);
     // Set the term path as the canonical URL to prevent duplicate content.
-    drupal_add_html_head_link(array('rel' => $rel, 'href' => url($uri['path'], $uri['options'])), TRUE);
+    $build['#attached']['drupal_add_html_head_link'][] = array(
+      array(
+        'rel' => $rel,
+        'href' => url(
+            $uri['path'], $uri['options']
+        )
+      ), TRUE);
+    drupal_render($build);
 
     if ($rel == 'canonical') {
       // Set the non-aliased canonical path as a default shortlink.
-      drupal_add_html_head_link(array('rel' => 'shortlink', 'href' => url($uri['path'], array_merge($uri['options'], array('alias' => TRUE)))), TRUE);
+      $build['#attached']['drupal_add_html_head_link'][] = array(
+        array(
+          'rel' => 'shortlink',
+          'href' => url(
+              $uri['path'], array_merge(
+                  $uri['options'], array('alias' => TRUE)
+              )
+          )
+        ), TRUE);
     }
   }
 
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/style/Rss.php b/core/modules/views/lib/Drupal/views/Plugin/views/style/Rss.php
index 90a5390..b229bc0 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/style/Rss.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/style/Rss.php
@@ -57,12 +57,15 @@ public function attachTo($display_id, $path, $title) {
         '#title' => $title,
       );
       $this->view->feed_icon .= drupal_render($feed_icon);
-      drupal_add_html_head_link(array(
-        'rel' => 'alternate',
-        'type' => 'application/rss+xml',
-        'title' => $title,
-        'href' => $url
-      ));
+      $build['#attached']['drupal_add_html_head_link'][] = array(
+        array(
+          'rel' => 'alternate',
+          'type' => 'application/rss+xml',
+          'title' => $title,
+          'href' => $url
+        )
+      );
+      drupal_render($build);
     }
   }
 
